Support » Plugin: WP Lightbox 2 » Duplicate image captions

  • Resolved rguthrie


    Thanks for this plug-in, which I have been directed to as the one I currently use is broken by the latest WP update to 3.6.

    I have noticed a small glitch, which is that if I use a character in the title or caption which is represented by an ampersand character, both the title and the caption are displayed, in that order. The issue is caused by different ampersand characters being implemented by WP.

    For example, the single inverted comma is represented by ' in the title, but by ’ in the caption. When your script checks to see if the title and caption are the same, it finds, of course, that they are different, and proceeds to display them both.

    In the database structure, both the post_title and post_excerpt have the same collation (utf_general_ci), so I can see no reason why the characters should be represented differently.

    I have hacked the script (version 2.28.3, removing lines 204-209) to prevent any caption text from being appended, but it’s not an elegant solution. Can you suggest something better?



Viewing 3 replies - 1 through 3 (of 3 total)
  • I am not able to duplicate the error. Can u please post the site url where it’s throwing error.

    On this page,
    the third and eleventh images of the gallery are showing both the title and the caption. I am now running WP 3.6, and have disabled my hack for you to see the issue

    Hi Pankaj

    I have been thinking about this issue some more, and have come to see the ‘issue’ rather as a ‘feature’ of your plugin. With the previous plugin that I used, I had to insert a title for any wording to be displayed with the lightbox image. With your plugin, the caption is pulled in and displayed if no title has been entered, or if the title is different.

    I can therefore dispense with a title for the image link, if I want the text to be identical to the caption, or add new text if I want additional information about the image displayed when viewed at full size.

    The only ‘improvement’ that I could envisage to your plugin would be to have an option in settings to display the caption or not.

    The issue has arisen because I didn’t understand fully how your plugin worked, and so gave too much information when setting up an image in a gallery, i.e. filling in both caption and title.

    For the reasons above, I consider the topic resolved. Thank you for your time in looking into it.


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Duplicate image captions’ is closed to new replies.