Using: Drupal 5.7, Image 5.x-1.9, Image Assist 5.x-1.6, Lightbox2 5.x-2.8

I am using Image Assist to insert images into nodes. I have the thumbnail size configured as 'Image trigger size' and the new 'Lightbox2 5.x-2.8' module works fine since installed except for images uploaded with a custom size.

An example of the code inserted by Image Assist into the body of the node:
[img_assist|nid=404|title=|desc=|link=node|align=none|width=175|height=175]

And the resulting HTML code when viewing the node:
<p><span class="inline inline-none"><a href="/node/404"><img src="http://www.example.com/system/files/img/image001.img_assist_custom.jpg" alt="" title="" class="image image-img_assist_custom" width="175" height="175" /></a></span></p>

The default failed image camera icon appears when I click on the custom-sized image in the node.

Comments

yuit’s picture

I have done further testing:

1) the Lightbox2 problem with custom sized images published in a node using Image Assist only appears when selecting the "link to image page" and "go to URL" types of links in Image Assist.

2) when selecting the "open in popup window" type of link in Image Assist, I hit the problem reported in http://drupal.org/node/277119, but other than that it works fine. In this case the Image Assist code inserted in the node is:
[img_assist|nid=404|title=|desc=|link=popup|align=none|width=175|height=175]
And the resulting HTML output on my site is:
<p><span class="inline inline-none"><a href="http://www.example.com/system/files/img/image001.preview.jpg" onclick="launch_popup(404, 550, 550); return false;" target="_blank"><img src="http://www.example.com/system/files/img/image001.img_assist_custom.jpg" alt="" title="" class="image image-img_assist_custom" width="175" height="175" /></a></span></p>

stella’s picture

You need to specify the image handler for Automatic handler for Image Assist custom size images on admin/settings/lightbox2/automatic.

If you select the "open in popup window" link type in Image Assist, while having automatic image handling enabled, then the image will be opened in a lightbox AND a popup window - so you probably don't want to select this option.

There is a patch in #277119: Image Assist link triggers pop-up AND lighbox which I would advise you to use if you select the "Lightbox" automatic image handler (i.e. ungrouped).

If you've done all of the above and it still fails to work, then please send me a link to your site. My contact form is enabled if you wish to do so privately.

Cheers,
Stella

yuit’s picture

Thanks for your reply.

The image handler for Automatic handler for Image Assist custom size images was already configured and set to lightbox grouped. I have just tried to switch it to lightbox or slideshow, but there is no change. It still fails to work.

We preferably use the "link to image page" or "go to URL" link types in Image Assist, so the "open in popup window" issue is not really a big problem for us.

I'll send you privately a link to the page of our site which shows the problem in action.

yuit’s picture

Just updating the site config info as we have updated to Drupal-5.8:

Drupal 5.8, Image 5.x-1.9, Image Assist 5.x-1.6, Lightbox2 5.x-2.8

No change to the issue otherwise.

stella’s picture

Status: Active » Fixed
StatusFileSize
new1.12 KB

Try the attached patch or the latest dev release (available later today).

Cheers,
Stella

yuit’s picture

Stella,

Many thanks for the patch. I have now downloaded and installed the latest dev version dated 21st July. It is working in that images published in a node via image_assist using a custom size now display.

However I witness something else, and I am not sure whether it is a bug or feature.

I have a node incorporating 6 images published via image_assist, with 4 different sizes:
* 2 images published on the node using the thumbnail size:
image1:: [img_assist|nid=13|title=|desc=|link=popup|align=right|width=150|height=97]
image2:: [img_assist|nid=33|title=|desc=|link=node|align=right|width=150|height=86]

* 2 images published on the node using a custom size (same width for both images):
image3:: [img_assist|nid=34|title=|desc=|link=node|align=center|width=200|height=275]
image4:: [img_assist|nid=13|title=|desc=|link=node|align=center|width=200|height=129]

* The same image as image 4 above published on the node using a different custom size:
image5:: [img_assist|nid=13|title=|desc=|link=node|align=center|width=300|height=194]

* 1 image published on the node using yet another custom size, different from the above ones:
image6:: [img_assist|nid=14|title=|desc=|link=node|align=center|width=100|height=156]

All handlers are configured to be 'lightbox grouped'.

=> When I click on image1 or 2, I can navigate through a group which consists of images 1 and 2 only.

=> When I click on image 3 or 4, I can navigate through a group which consists of images 3, 4 and 6.

=> When I click on image 5, I can navigate through a group which consists of images 3, 4 and 6 (4 being the same as 5 but with a different custom size, it is fine by me that it skips the duplicate).

=> When I click on image 6, I can navigate through a group which consists of images 3, 4 and 6 (4 being the same as 5 but with a different custom size, it is fine by me that it skips the duplicate).

Lightbox2 seems to group 'thumbnail' sized images together on one side, and 'custom sized' images together separately regardless of the fact that all custom sizes are not the same. Thumbnails and custom sizes are not all grouped in a single image set. The handler seems to be based on image size (thumbnail or not thumbnail) rather than the method used to publish the image (image_assist in my case).

Again, based on how Lightbox2 is programmed, I am not sure if this is a bug or a feature, but it would be nice if all images on a single node were grouped together.

Should I re-open this bug report, or should it be filled as a feature request ?

stella’s picture

StatusFileSize
new990 bytes

No, here is fine, because it was introduced in the last patch. Apply the attached patch to the lightbox2 dev version you just downloaded.

Cheers,
Stella

yuit’s picture

It works with this last patch. Many thanks Stella ! The great support you are providing to users of this module is very much appreciated.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

stella’s picture

Released in Lightbox2 6.x-1.9 and 5.x-2.9.

Cheers,
Stella