Title: [Plugin: Lightbox Gallery] Broken images with upgrade to 3.3 and 3.3.1
Last modified: August 20, 2016

---

# [Plugin: Lightbox Gallery] Broken images with upgrade to 3.3 and 3.3.1

 *  [Estelle](https://wordpress.org/support/users/estelleihasz/)
 * (@estelleihasz)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-lightbox-gallery-broken-plugin/)
 * The plugin images ‘next’ and ‘loading’ are broken with an upgrade to WP 3.3 and
   3.3.1
 * [http://wordpress.org/extend/plugins/lightbox-gallery/](http://wordpress.org/extend/plugins/lightbox-gallery/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [fleetadmiralj](https://wordpress.org/support/users/fleetadmiralj/)
 * (@fleetadmiralj)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/plugin-lightbox-gallery-broken-plugin/#post-2483903)
 * I hate to revive a dead thread, but I’m also having this problem. I’m using WP
   3.3.1 and whenever I click “next” or “prev” all I get is the spinning icon and
   the new image does not load.
 * I would love this plugin to work as it does exactly what I want (shows the image
   DESCRIPTION in the lightbox AND uses the native gallery functionality of WordPress)
   but it’s pretty useless if people can’t get from one image to the next.
 *  [fleetadmiralj](https://wordpress.org/support/users/fleetadmiralj/)
 * (@fleetadmiralj)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-lightbox-gallery-broken-plugin/#post-2483904)
 * Well…I think I’ve gotten the problem more or less narrowed down to the _start
   function in jquery.lightbox.js, specifically the if-else statement between lines
   89 and 96.
 * From what I can tell, it’s loading the initial array incorrectly, so that the
   transition between the first and second image in the gallery is breaking. Specifically
   in my case, it’s trying to load the URL associated with the first image as the
   2nd item in the image gallery. All other images appear to load up fine (for example,
   I can click on the 2nd image and proceed through the rest of the gallery just
   fine).
 * For whatever reason, it’s hitting the “else” part of this code for the first 
   image and the “if” part for everything else. I just haven’t figured out why yet…
 *  [fleetadmiralj](https://wordpress.org/support/users/fleetadmiralj/)
 * (@fleetadmiralj)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-lightbox-gallery-broken-plugin/#post-2483905)
 * Aha…I figured out the problem. I had a link in the description of the first item,
   and that was messing it up.
 * It’s hitting the “else” in the if-else statement because it’s the first image(
   and thus i < 1 in the encompassing for-loop). However, when it’s adding items
   to the array, it’s grabbing the URL of the image to grab like this:
 * jQuery(jQueryMatchedObj[i]).parent().parent().children().children().attr(‘href’)
 * Now, I don’t know where the two parent()’s are coming up form but I assume they
   are getting you to appropriate “gallery-item” dl. The first child gets you down
   to dt/dd under that (since it’s grabbing all children), and then the next child
   goes to the a tag (with the image link) under the dt, and the caption and description
   spans under the dd. It then grabs anything with an “href” attribute from those
   three items.
 * However, since I had a link in the description, it not only grabbed the href 
   from the image a tag in the dt, but it grabed the href from the link I added 
   to the description, and viola, it added two items at once, one of which was not
   a link to the image, which blew the code up.
 * This isn’t a fatal problem – I guess I can just put the text of the link in the
   description without having the actual link there (unless I can figure out a fix
   to temporarily go there) but I think it might be better to attempt to reference
   that dt a tag specifically. I certainly don’t think it would be too difficult
   to grab the “href” items from the dt instead of from the dl. I do think being
   able to put in a link into the description would be a useful thing to have.
 * I don’t know if this is the problem the original person was having, but this 
   is the problem I was having.
 *  [fleetadmiralj](https://wordpress.org/support/users/fleetadmiralj/)
 * (@fleetadmiralj)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-lightbox-gallery-broken-plugin/#post-2483906)
 * OOOOOOK, I did a little fix. In the lightbox-gallery.js file, I changed
 * jQuery(‘.gallery a’).tooltip({track:true, delay:0, showURL: false});
    jQuery(‘.
   gallery1 a’).lightBox({captionPosition:’gallery’});
 * to
 * jQuery(‘.gallery dt a’).tooltip({track:true, delay:0, showURL: false});
    jQuery(‘.
   gallery1 dt a’).lightBox({captionPosition:’gallery’});
 * That’s telling it to ONLY grab the a tags under the dt tag (where the image is
   anyway). This fixed it so that I could put a link in the description and have
   it work.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: Lightbox Gallery] Broken images with upgrade to 3.3 and 3.3.1’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/lightbox-gallery_4a535d.svg)
 * [Lightbox Gallery](https://wordpress.org/plugins/lightbox-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lightbox-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lightbox-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/lightbox-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lightbox-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lightbox-gallery/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [fleetadmiralj](https://wordpress.org/support/users/fleetadmiralj/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-lightbox-gallery-broken-plugin/#post-2483906)
 * Status: not resolved