Closed (fixed)
Project:
Lightbox2
Version:
6.x-1.9
Component:
Javascript
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jul 2008 at 09:18 UTC
Updated:
5 Oct 2010 at 15:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
stella commentedWell 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
Comment #2
chlobe commentedHi 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
Comment #3
stella commentedOk, 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
Comment #4
chlobe commentedLightbox 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
hope that helps
Comment #5
stella commentedOk 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
Comment #6
chlobe commentedStella
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
Comment #7
stella commentedWhat 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
Comment #8
chlobe commentedwhen 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
Comment #9
stella commentedchlobe: what text are you using to insert the image? I can't reproduce the issue you're having.
Comment #10
chlobe commentedThe text is the title or description field for the image via img_assist
Comment #11
stella commentedThat'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
Comment #12
chlobe commentedSorry Stella, I don't know how to answer that - I simply use the image_assist UI to insert images that have been uploaded.
Comment #13
stella commentedAh 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
Comment #14
chlobe commentedThanks 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
Comment #15
stella commentedI 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
Comment #16
stella commentedTry the attached patch.
Cheers,
Stella
Comment #17
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #18
stella commentedReleased in Lightbox2 5.x-2.9.
Cheers,
Stella
Comment #19
Carlos Miranda Levy commentedThis is still present or has reappeared in the latest version of Image Assist - http://drupal.org/project/img_assist
The problem is that Image Assist uses its own embedded javascript code to open the image in a new window, and when properly configuring Lightbox to support its class, the browser ends up opening two windows: Image Assist's new browser pop up window and Lightbox2's lightbox.
There is no option currently within Image Assist to link directly to the image. There is one option to link to the image page, which works fine with Lightbox2, but it opens the entire image page, header, columns, blocks and all within the Lightbox2 lightbox window, which is not the effect you are looking for.
A work around in the meantime is to use the Custom URL option in Image Assist and manually enter the image's URL (and add the 'image' class to the custom class images option in Lightbox2 settings page).
I have posted a fix on Image Assist at http://drupal.org/node/265200#comment-2360938 which requires changing one line and adding 3 more at img_assist.module.
Comment #20
stella commentedDon't use the 'Open in popup window' - instead use 'Go to url' and it should work fine.