Incompatible with imagecache 5-2 branch

dman - March 22, 2008 - 03:30
Project:Taxonomy image
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:NancyDru
Status:closed
Description

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

not module_exists() as an interim measure.

(Imagecache 5-2 is v. cool)

AttachmentSize
taxonomy_image-imagecache_compat-2008-03-22.patch726 bytes

#1

dman - March 22, 2008 - 03:32

Um, codefilter ate my suggestion.

  $ic_exists = function_exists('_imagecache_get_presets');

#2

NancyDru - March 22, 2008 - 13:40

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

#3

NancyDru - March 22, 2008 - 14:33

http://drupal.org/node/226872

Is there a similar function in 2.x?

#4

dman - March 23, 2008 - 00:07

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.

#5

NancyDru - March 23, 2008 - 14:06

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.

#6

NancyDru - March 23, 2008 - 16:02

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

AttachmentSize
taxonomy_image_ic52.patch1.15 KB

#7

NancyDru - March 24, 2008 - 17:14

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

#8

NancyDru - March 24, 2008 - 17:50
Assigned to:Anonymous» NancyDru

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?

AttachmentSize
taxonomy_image_ic52.patch2.09 KB

#9

dman - March 24, 2008 - 22:00

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...

#10

NancyDru - March 24, 2008 - 23:30

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

#11

NancyDru - March 29, 2008 - 17:38

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.

#12

NancyDru - April 2, 2008 - 18:40
Priority:normal» minor

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

#13

NancyDru - April 8, 2008 - 16:17
Status:patch (code needs review)» fixed

Fix committed. Couldn't wait for testers.

#14

dman - April 9, 2008 - 08:39

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.

#15

Anonymous (not verified) - April 23, 2008 - 08:41
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.