Support » Plugin: Lightbox with PhotoSwipe » Small Bug clicking on 2nd of 2 photos

  • Resolved Pinwizkid

    (@pinwizkid)


    Here’s one that only my extremely bored, ocd client managed to find…

    If you have a gallery of two images, and you click on the 2nd image thumbnail to open the lightbox and then use the on screen arrows buttons to navigate to the first image, the first image will not appear. The lightbox slideshow will “navigate” to it, but it won’t actually show anything. However, if you close the lightbox and open the first image first, it will load properly AND will make it work when clicking the second image first.

    I’ve also noticed that if you leave the page and come back, the bug will be gone assuming you clicked on the first image at some point. It also does not seem to occur on galleries of 3 or more but I only tested this on one other page.

    Maybe this is due to some image optimization plugins or lazy loading I have activated, but figured I’d throw up a thread here to see if anyone else can reproduce the bug.

    Thanks for the great plugin and support!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    With a standard WordPress installation I can’t reproduce this bug.

    See here: https://wordpress-demo.arnowelzel.de/lightbox-with-only-two-images/

    If you have an URL where this bug can be reproduced, I’ll try to figure out what’s going on.

    Thread Starter Pinwizkid

    (@pinwizkid)

    The site I’m working on this database of old pinball machine brochures:
    http://dev.nypinball.com/new/brochures/

    Any entry that has 2 images does it, for example: The Addams Family:
    http://dev.nypinball.com/new/brochures/the-addams-family/

    Thanks!

    Plugin Author Arno Welzel

    (@awelzel)

    Thanks for the example – I can reproduce this here as well. It has nothing to do with the website. In fact the following conditions trigger the bug on my demo website as well:

    1) In the backend the option “Allow infinite loop” has to be enabled.

    2) The image must not have been loaded yet (or the cache was cleared and then the page got reloaded before displaying the first image).

    At the moment I don’t have a clue what is going wrong here. Somehow the infinite loop of PhotoSwipe seems to have a bug, but I don’t know yet, how to fix that as it is not easy to debug.

    As a workaround you can just disable “Allow infinite loop”, then the bug will not show.

    Thread Starter Pinwizkid

    (@pinwizkid)

    Thanks for looking into it! Of course this client specifically asked me to enable infinite loop, so it’ll be his choice between the bug or the loop!

    Thread Starter Pinwizkid

    (@pinwizkid)

    Not sure if this is any help, but I tried using this old photoswipe plugin and to my amazement, it works and the bug is not present:

    https://wordpress.org/plugins/photo-swipe/

    Your plugin has more options though and plays nicer with elementor (elementor galleries don’t seem to work with this old plugin). Anyway, just figured I’d share in case there was a way to learn anything from it!

    Plugin Author Arno Welzel

    (@awelzel)

    Thanks for the hint. Indeed I did change some things in PhotoSwipe (as documented in the FAQ) and probably introduced this bug. I’m just to busy to fix this right away – but I still have this on my todo list.

    Plugin Author Arno Welzel

    (@awelzel)

    Release 2.9 contains a fix for this problem.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Small Bug clicking on 2nd of 2 photos’ is closed to new replies.