After laying down for bed, I had an epiphany last night and got up and based away at the keyboard for a bit. Luckily, the effort wasn’t wasted, as I was able to fix the issue that caused the problem in the first place.

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 tag. For instance:

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. Very handy feature, for sure!

However, if the rel param happens to have a space in it, this appears to break completely, resulting in the image not being displayed. I’m sure there’s some degree of bug on Thickbox’s side, but I decided to fix it on the NextGEN Gallery side since that’s code I’m far more familiar with.

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

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.