Fatal error: Call to undefined function _imagecache_get_presets() in /home/content/e/l/s/elsassr/html/modules/teaserthumbnail/teaserthumbnail.module on line 22

Comments

alan d.’s picture

With the jump to imagecache 5.2, the function names changed.

See if the issue as been raised yet on the teaserthumbnail issue queue, or post one if it hasn't. You could always roll back to the older imagecache, but the new version is so much better.


Alan Davison
www.caignwebs.com.au

Alan Davison
elsassr’s picture

Yes it has It has not worked since I installed it. Will I have any problems rolling back to the earlier version? Thanks so very much!

alan d.’s picture

There were fairly big changes, I'd think that you would loss some info trying.

See http://drupal.org/node/262481

I take it that you've followed the steps in the upgrade.txt reasdme?

I've had a quick look, try changing the teaserthumbnail modules file, teaserthumbnail.module, about line 20

<?php
  // We build a clean array of the presets namespaces to store the preset
  // itself and not its key
  $presets = _imagecache_get_presets();
?>

to

<?php
  // We build a clean array of the presets namespaces to store the preset
  // itself and not its key
  $func = (function_exists('imagecache_presets')) ? 'imagecache_presets' : '_imagecache_get_presets';
  $presets = $func();
?>

PS: Untested, but should be fine :) I haven't a D5 local install with the required modules


Alan Davison
www.caignwebs.com.au

Alan Davison
Marat’s picture

I tested, it works to get ride of the fetal error , but I get this warning

warning: Illegal offset type in /home/public_html/sites/all/modules/teaserthumbnail/teaserthumbnail.module on line 26.

However, this works with me http://drupal.org/node/268035#comment-959294