• I figured I’d share this in case anyone else experienced this problem. I believe the issue is, at its heart, a change in Thickbox behavior, but I’m not 100% sure. I blogged this same thing on my site, but wanted to try to get it in front of the developers (who don’t appear to have a contact form on this site).

    The long story boiled down is that the ThickBox can find a “group” of images if you pass it common name in the rel param in your a a tag. For instance:

    <a href=”https://mikebrum.com/full_image.jpg” class=”thickbox” rel=”anyString”><img src=”https://mikebrum.com/thumb_image.jpg” /></a>
    That’s simple enough. Any link that has the rel param set to “anyString” will be shown with Thickbox having “next” and “prev” links so you don’t have to view, close, open the next by hand.

    However, if the rel param happens to have a space in it, this appears to break completely, resulting in the image not being displayed (you just get that “loading” bar that never completes).

    The fix is rather simple. In <your_WP_root>/wp-content/plugins/nextgen-gallery/lib/image.php, find the line:

    function get_thumbcode($galleryname = ”) {

    Immediately under that, add the following two lines:

    // Fix thickbox failure when $galleryname has a space in it
    $galleryname = preg_replace( ‘/\s+/’, ”, $galleryname );

    And that’s it. That strips the whitespace from the $galleryname variable which is what’s passed on to the code that populates the rel param in image links for Thickbox.

    Just keep in mind that if you make this change on your server, your changes will be overwritten when you perform your next update — so make a note and be sure to apply this fix again after you upgrade.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Is there a plugin to download that will give you access to <your_WP_root>/wp-content/plugins/nextgen-gallery/lib/image.php – I do not have access to that.

    Thread Starter mbrum

    (@mbrum)

    I have no idea. I would think if you don’t have access to editing the file, then you wouldn’t have file permissions even if you find a plugin that lets you edit files in the plugin directory.

    I just ssh’ed into my host and edited it in place.

    If you don’t have SSH access, then you can try downloading the plugin, unzipping it, making the changes locally, then FTP’ing the file to your server.

    If you’re able to do even that, then you might want to ask your site admin if they can help.

    I have the issue you’ve discribed, but the solution doesn’t work for me.

    Maybe the ‘quotes’ have been mixed up by this website?

    Your code: $galleryname = ”
    My sourcecode: $galleryname = ”

    Any chance you could look into that?
    I’d love to make the thickbox work again.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: NextGEN Gallery] Thickbox breakage after upgrade to WP 3.2.1 [solution]’ is closed to new replies.