Recently updated jQuery UI to 6.x-1.4 with the UI library 1.7.3. Then I updated modules dependent on the 1.7.x library (modal and latest jQuery UI module). Everything seemed to be working fine, but the lightboxes don't want to show captions anymore—even when I force it to use the node title as the caption. It makes a brief pause before loading a blank caption area. A link to this behavior in action can be found here: http://www.climas.arizona.edu/testing-lightbox-more
I use the Insert module to get the images into the content area and I have the Image Caption module use the alt text for the inline captions.
Thanks in advance for helping me investigate this. I'm not sure if Lightbox is even the culprit, but it seems to be the only module affected by the jQuery updates.
Comments
Comment #1
stella CreditAttribution: stella commentedHmmm you have a rel attribute of
lightbox[group1][]
- the second [] is meant to hold the caption. Put your caption text in there and it should work. Or you could also try removing the empty [] altogether and it might use the alt text. Try it and let me know how you get on.Comment #2
Geijutsuka CreditAttribution: Geijutsuka commentedAh-ha, It doesn't load the caption if I take out the second set of brackets, but it does display text if I type it into the brackets.
Comment #3
stella CreditAttribution: stella commentedFrom looking at the code, that's intended, unless you're using the automatic image handling features, which you're not in this case.
Comment #4
Geijutsuka CreditAttribution: Geijutsuka commentedI'm not changing this issue back to active, but I need a bit more explanation.
I don't have the automatic image handling features enabled, and I never had to have them enabled in the past (should I have them enabled?). I am relying on the functionality described in the lightbox general settings under "CCK display settings" where it says, "By default, the caption for imagefields is the image title text configured. If no title is configured, then the alt text will be used." Before this recent update, I set things up such that users could insert the image inline with the text, then put title text in the wysiwyg's image properties and that text would display in the lightbox. I don't mind going into the code and typing a caption into the brackets, but expecting the computer-illiterate users on the site to do that is unfortunately problematic. It looks as if the lightbox will only show text if it's manually typed into the rel attribute brackets. Are you saying that lightbox is working as expected and that something else is getting in its way of automatically grabbing the image's title text and displaying it in the lightbox?
Comment #5
stella CreditAttribution: stella commentedThe image that you have on that page appears to be a manually entered image, perhaps created by hand or perhaps inserted via a wysiwyg. It does not appear to be an image uploaded via the Image module, or flickr, or anything else that uses automatic image handling. It might be a CCK imagefield? maybe using insert module?
In any case it will try the following when trying to find a caption for CCK imagefields:
However all of that is ignored if the theme_imagefield_image_imagecache_lightbox2() function has a value for $args['caption'].
So I guess is this an imagefield? Have you overwritten theme_imagefield_image_imagecache_lightbox2() if so? And failing that are you happy enough to add in debug print statements to see where $caption is being set to an empty string?
Comment #6
Geijutsuka CreditAttribution: Geijutsuka commentedYeah, I'm using a CCK ImageField and the Insert module, and I haven't done anything in the theme relating to theme_imagefield_image_imagecache_lightbox2()...
I am more than willing to add debug print statements to find out where $caption is being set, but I've never delt with debugging print statements before and I'm such a novice that I would I need someone to hold my hand and show me how top implement them correctly. Is there a page on drupal.org that'll explain debugging to me?
Comment #7
stella CreditAttribution: stella commentedAh it's simple, just put in lines like
print "after alt line: $image_title<br>";
after each line where that variable changes in that theme function.Comment #8
Geijutsuka CreditAttribution: Geijutsuka commentedAt the risk of sounding like a complete novice dolt, I'm not sure exactly where you mean. Would this be in the lightbox2.formatter.inc file, after lines which are like this one:
?
Comment #9
Geijutsuka CreditAttribution: Geijutsuka commentedNew developments...
In my quest to solve this issue, I finally got to my sandbox, installed a new version of Drupal, and re-uploaded my jQuery stuff (jQuery UI 6.x-1.4, jQuery UI library 1.7.3 and jQuery Update 6.x-2.x-dev). I have a limited amount of up-to-date modules turned on to make inline images with lightboxes work: CCK FileField, ImageField, ImageCache, Insert, and Lightbox2. I made a new imagefield in the page content type for inserting images into content.
So, when I insert an image *and* have the user permission of downloading the original image, Insert places this code into the text area (no wysiwyg installed):
...which gives a string of code (
Download Original</a>]" href="http://localhost/sites/default/files/imagecache/600scale/images/pages/bau-var-pur.jpg">
) and breaks the lightbox.When I do not have the permission of downloading the original, I get this code inserted:
...which allows the lightbox to work, but it's still not displaying a caption inside the lightbox.
I'm not sure what to make of all this, but can anyone else confirm or deny this behavior?
Comment #10
daemonchrist CreditAttribution: daemonchrist commentedConfirmed.
No captions in Lightboxes for images uploaded using Image Module either. See http://www.amberleechristey.com/photo-album/portfolio/wedding-photography
They were there prior to updating to 6.x-1.11 and required JQuery.
Comment #11
jan_v CreditAttribution: jan_v commentedSame here as #10 and #9.
Running latest versions. Lightbox seems to be doing his job. My 'rel' attribute gets set on the right images with the right value, but no caption is shown.
This is what happens:
But when lightbox opens, no caption is shown. And if i change the value manually like rel="lightbox[node_images][testing]" i still get nothing.
Comment #12
paraklete CreditAttribution: paraklete commentedhad the same problem with the caption disappearing. Showed up after I upgraded several things. Backtracked all and for that when I went back to 6.x-1.9 the caption came back. It is not there for 6.x-1.10 or 6.x-1.11. So now I am in a quandry. Do I show the captions and ignor the security warning?
Comment #13
NPC CreditAttribution: NPC commentedSubscribing, have the same problem with images inserted from CCK ImageField using Insert module (on DEV).
Comment #14
Geijutsuka CreditAttribution: Geijutsuka commentedUnfortunately, this is still an issue... I am changing the status back to active in hopes it will get another look. I'm still confused about what to do regarding comments #7 and #8.
Comment #15
Petr IllekAny progress in this issue?
I can confirm, that lightbox is not getting the caption whne using Insert module.