First, thanks for this very useful and attractive module. I really enjoy the clean look and feel, as do others who use it.

I have a site where there is a derivative image size named Thumbnail-Large, and I'm using img_assist to display inline images. I can't change the derivative names to avoid using hyphens. Too much depending on this setup now...

When I enable 'Lightbox Grouped' triggers on derivatives with hyphenated names, and tell Lightbox2 to display the original image size (in the 'Lightbox image display size' config field), the image doesn't display in the pop-up lightbox window, instead, we see an error indicator, signaling a problem loading the file.

For an inline derivative file named test.thumbnail-large.jpg the JavaScript seems to be trying to load test-large.jpg so it seems it's having trouble with removing the trailing -large derivative label data.

My apache server log shows something like this:

[Tue Jun 17 16:15:03 2008] [error] [client x.x.x.x] File does not exist: /path-to-web-files/sites/default/files/images/test-large.jpg, referer: http://example.com/source-path-elided

(Names changed to protect my server...)

It appears that the regular expression used to generate the image file name doesn't deal well with hyphenated derivative names. I have run the JavaScript through the FireBug debugger, and I think I've verified the source of the problem (it was a week ago, so I can't recall the exact location), but I'm not competent to whip up a new regular expression to fix the problem.

I use FireFox 2.x, and I've had the same results in IE7 and Safari. And I am using the latest JQuery Update module, as far as I know.

I can provide a URL to a page on my live site that demonstrates the problem, if a module maintainer requests via email or other contact method. (I don't want to post the URL directly for a variety of reasons.)

Please let me know if I can help diagnose this problem.

Comments

stella’s picture

I don't think the problem is with the hypens. I think the issue is that you have "thumbnail" and "thumbnail-large" derivatives and both are specified as the image trigger sizes. If you remove the "thumbnail" size from the list of image triggers does it work?

Cheers,
Stella

mcurry’s picture

Status: Fixed » Active

Yes, it does work if I set the "Image trigger size" selector to only the Thumbnail-Large derivative.

What does that tell us? (Besides the fact that I should have tried that myself, before reporting the issue... sorry I missed that.)

stella’s picture

Status: Active » Fixed

The image derivative with the longer name needs to be handled first. I've implemented this and committed it to CVS. It will be included in the next dev release, available later today. I would provide a patch but there's quite a number of other changes included now that I don't think it would apply cleanly. You can either grab the code from CVS or the next dev release - it should be perfectly stable.

Cheers,
Stella

mcurry’s picture

Status: Active » Fixed

Fantastic, thank you very much for a prompt response!

I'll try the development package as soon as I can (probably later this evening) and let you know how it works.

mcurry’s picture

I just installed 5.x-2.x-dev on my site, and it seems to solve the problem as I described it. So, thanks again for the prompt fix, and thanks again for the great module.

-MIke

stella’s picture

Released in Lightbox2 5.x-2.8 and 6.x-1.8.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)

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