Image Assist link triggers pop-up AND lighbox
chlobe - July 1, 2008 - 09:18
| Project: | Lightbox2 |
| Version: | 5.x-2.x-dev |
| Component: | Javascript |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
Hi
Not sure where to start (or try to coherently describe this) but when activating the image assist image link, the original image is triggered in BOTH external pop up image_assist view AND as a lightbox image (although the lightbox triggered image doesn;t load ciorrectly as the default failed image camera icon appears.)
Any tips on how to unravel this?
Greatly appreciated

#1
Well which do you want to happen? Do you want it to open in just the lightbox? Or just the image assist view? Can you send me a link to your site where this happens? My contact form is enabled if you wish to do so privately.
Are you using the latest dev version?
Cheers,
Stella
#2
Hi Stella, thanks so much for the fast response, more than I expected.
Sorry I wasn't to specific, I have installed and uninstalled this module many times and had lost track of the version - but yes it is the latest dev version (downloaded today). Unfortunately I am still developing on a local machine (hours off uploading as I need to have a pilot site up for tomorrow for comment from my user group).
and I am only interested in the lightbox view.
Probably doesn't give you much to go on until you can view a URL but I appreciate your assitance.
Best
#3
Ok, well can you send me your lightbox2 settings, along with the html for the link and image? Just rem to enclose it in <code> tags when pasting in.
Cheers,
Stella
#4
Lightbox Settings
General settings
Nothing of note - all default
Automatic image handler settings
General Settings
- None
Automatic handler
- Lightbox
Lightbox image display size:
- Original
Image trigger size:
- Preview
Image Assist Images:
- Lightbox
No custom class images
HTML
<span class="inline inline-left"><a target="_blank" onclick="launch_popup(85, 640, 425); return false;" href="http://localhost/xampp/pla/?q=system/files/images/Rouse2_mayor+and+Steve.JPG/lightbox2" rel="lightbox[Casey sports forum keynote speaker Steve Monaghetti (right) and City of Casey Mayor, Cr Colin Butler]">
<img class="image image-preview" width="400" height="266" title="Casey sports forum keynote speaker Steve Monaghetti (right) and City of Casey Mayor, Cr Colin Butler" alt="Casey sports forum keynote speaker Steve Monaghetti (right) and City of Casey Mayor, Cr Colin Butler" src="http://localhost/xampp/pla/?q=system/files/images/Rouse2_mayor+and+Steve.preview.JPG" rel="lightbox"/>
</a>
<span class="caption" style="width: 398px;">Casey sports forum keynote speaker Steve Monaghetti (right) and City of Casey Mayor, Cr Colin Butler</span>
</span>
</p>
<p>
hope that helps
#5
Ok there are a few things wrong with the above HTML.
First off to set a lightbox caption, the format should be
rel="lightbox[][caption]"orrel="lightbox[group][caption]". Note, the caption text appears in the second set of square brackets.The anchor href attribute should be the path to the image (http://localhost/xampp/pla/?q=system/files/images/Rouse2_mayor+and+Steve...) and not (http://localhost/xampp/pla/?q=system/files/images/Rouse2_mayor+and+Steve...) - i.e. remove the trailing
/lightbox2. This explains why an "image not found" image is appearing in the lightbox for you.There is a
rel="lightbox"attribute set on the img tag which is not valid. You just need to set it on the anchor tag as you already have done.As for the lightbox vs image assist problem, the anchor tag has the attribute
onclick="launch_popup(85, 640, 425); return false;"which is causing the image assist popup to appear. This needs to be removed if you don't want that popup.Is this link being generated via some image assist filter? If so, what text are you using to generate the link? And what versions of the image and img_assist modules are you using?
Cheers,
Stella
#6
Stella
Thanks for isolating the problem for me. Following your instructions, I made the requisite HTML modifications using Firebug and the lightbox image was activated without the image_assist pop up. I am at a loss now in terms of what to do to isolate where the tags are coming from - I have gone back to image_assist, changed filters, reconfigured filters etc but nothing as yet. I am loathe to switch to a new method of images inserttion as I have a lot of content that would need to be re-applied in a short amount of time.
Pressing on with it and will post back with any progress - if you have any suggestions as to a good protocol in how to isolate this issue I would be greatful but thanks for your help in getting me this far.
regards
#7
What versions of the image and img_assist modules are you using? And what is the text you have to enter in order for the image html to be generated? If you send me that info, I'll take a look and see if I can isolate the issue. I imagine it's a bug in the image assist module, but can't be sure until I investigate it more.
Cheers,
Stella
#8
when the issue first arose I had img_assist 5.x-1.6 installed and have recently installed 5.x-1.x-dev to investigate other versions and this conflict.
image version is 5.x-1.8
thanks again for your help Stella, above and beyond given the issue would seem to be residing with another module.
Many thanks
#9
chlobe: what text are you using to insert the image? I can't reproduce the issue you're having.
#10
The text is the title or description field for the image via img_assist
#11
That's not what I mean, like do you use something like
[img_assist|nid=123]or something similar to insert the image into the node body?Cheers,
Stella
#12
Sorry Stella, I don't know how to answer that - I simply use the image_assist UI to insert images that have been uploaded.
#13
Ah okay, it's been a while since I played with image assist. I forgot you could do it that way! Well then, when inserting images that way, do _not_ select the option "open in a popup window". It'd be best to select "Link to image page" or "Go to URL" option. That should remove the "launch_popup()" bit from the generated HTML.
Image Assist still adds
rel="lightbox"to the generated HTML as far as I can figure out, but having it there doesn't cause any problems. It's just wrong is all.The caption in the wrong bit of the rel may actually be a lightbox2 problem. Will look into it.
Cheers,
Stella
#14
Thanks Stella, I'm halfway there. Choosing the link to image page option removes the pop-up. Cheers for that. Now lightbox is triggered but the image does not get loaded - generic camera image instead. Is this the added lightbox tag at work? Lightbox is triggered successfully with CCK image nodes so I know it can trigger and load correctly on my site.
cheers
#15
I think it's a lightbox2 bug. Changing the automatic image handler for "image nodes" to be "Lightbox grouped" should be a good workaround for now. You can do this on the admin/settings/lightbox2/automatic page.
Marking down to "normal" since there is a workaround.
Cheers,
Stella
#16
Try the attached patch.
Cheers,
Stella
#17
Automatically closed -- issue fixed for two weeks with no activity.