This is partly the imagecache's fault for changing its API
BUT
to be fair, it's taxonomy_image's fault for calling a _private function in the first place :)

woot.

Until such time as imagecache 5-2 goes stable, I won't expect a catch-up BUT I suggest

$ic_exists =function_exists('_imagecache_get_presets');
?>
not module_exists() as an interim measure.

(Imagecache 5-2 is v. cool)

Comments

dman’s picture

Um, codefilter ate my suggestion.

  $ic_exists = function_exists('_imagecache_get_presets');
nancydru’s picture

Nah, it's ImageCache's fault for not making that function an external API.

nancydru’s picture

http://drupal.org/node/226872

Is there a similar function in 2.x?

dman’s picture

Yes, it's called imagecache_presets(). But the structure of the response has changed a bit also I think.
Just like image.module did recently, they published the previously internal func. Because naughty programmers kept calling it. ;-)

I do believe a real re-implimentation can be postponed until imagecache 2 goes stable but a work-around that checks for the functionality available in the module version will prevent the nasty error we currently get.
I'm sure the actual fix will be trival.

nancydru’s picture

Naughty? I was just looking for an API that I needed. I'm glad they saw the light and published the hook that is needed.

I'll try to get this in today. I might go ahead and pull down the beta and see how different it is.

nancydru’s picture

StatusFileSize
new1.15 KB

I see your work-around and raise you a fix. Right now, I am not set up to test this, I hope you can.

nancydru’s picture

When you get to test this, please mark it as CNW or RTBC.

nancydru’s picture

Assigned: Unassigned » nancydru
StatusFileSize
new2.09 KB

Punt... I got at least a partial test set up and had a WSOD from the Views code that I missed. The attached patch looks complete to me and everything seems to work normally.

Now, what is Views 2 going to do to us?

dman’s picture

I've been meaning to test this... but it was a holiday and I was actually social for a change.
If I can get through the client-critical stuff enough to try a bit of dev stuff today I'll see...

nancydru’s picture

Hey, wait a minute! Drupallers are not allowed to have a life outside of DO! Stop that right now.

nancydru’s picture

We had at least two people report this, has anyone tested it yet? Even people not using Imagecache 5.2 should be testing to make sure the older version is not broken.

The fix for http://drupal.org/node/233084 is waiting for this to be reviewed.

nancydru’s picture

Priority: Normal » Minor

Well, I guess this wasn't so important after all. I'll have to commit it based solely on my testing.

nancydru’s picture

Status: Needs review » Fixed

Fix committed. Couldn't wait for testers.

dman’s picture

Apologies.
One workstream was stable with my earlier 'fix', and another was totally updated to latest & greatest. I didn't take time out to risk breaking either of them, and a diff between the 2-month-old module and the 1-month-old version was too major to merge.

I'm now happy using the

    if (function_exists('_imagecache_get_presets')) {
     ..
    }
    elseif (function_exists('imagecache_presets')) {
      ..

version.

I'm enjoying the new integrated interface also. v.good.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.