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

CommentFileSizeAuthor
#16 lightbox2_277119.patch794 bytesstella

Comments

stella’s picture

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

chlobe’s picture

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

stella’s picture

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

chlobe’s picture

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

stella’s picture

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]" or rel="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

chlobe’s picture

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

stella’s picture

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

chlobe’s picture

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

stella’s picture

chlobe: what text are you using to insert the image? I can't reproduce the issue you're having.

chlobe’s picture

The text is the title or description field for the image via img_assist

stella’s picture

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

chlobe’s picture

Sorry Stella, I don't know how to answer that - I simply use the image_assist UI to insert images that have been uploaded.

stella’s picture

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

chlobe’s picture

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

stella’s picture

Category: support » bug
Priority: Critical » Normal

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

stella’s picture

Status: Active » Fixed
StatusFileSize
new794 bytes

Try the attached patch.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

stella’s picture

Released in Lightbox2 5.x-2.9.

Cheers,
Stella

Carlos Miranda Levy’s picture

Version: 5.x-2.x-dev » 6.x-1.9
Status: Closed (fixed) » Active

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

stella’s picture

Status: Active » Fixed

Don't use the 'Open in popup window' - instead use 'Go to url' and it should work fine.

Status: Fixed » Closed (fixed)

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