Lightbox shows images from front page instead of current project page
-
Hi,
I’m seeing a lightbox issue on a project page I’m working on.
When I click an image here:
https://dev.nataschalibbert.nl/work/undermined/
…the lightbox does not show images from that project page. Instead, it opens/shows images from a normal page, specifically the News page, which is set as the front page.
Does anybody know how this is possible and how to fix it?
Thanks.
-
Extra debugging info:
The issue seems related to the Lightbox Addon collecting images that are present in the DOM but not part of the current project content.
On a direct load of a project page:
- the body tag is correct and shows data-type="project" and the correct project data-id
- the visible project images are correct
- the clicked project image has the correct data-id, for example data-id="97"
- however, the opened lightbox image has a different data-id, for example data-id="1081", and belongs to the static front page/news page
I searched the DOM and found that the wrong frontpage/news images are present inside the project page DOM, although they are not visible on the page.
They appear inside rows with classes like:
absolute-positioning-vertically-in-apl
The image column has attributes like:
data-type="img"
data-yvel="1"The lightbox then opens a Swiper gallery with the frontpage/news images, for example 1 / 12.
Important detail:
If I temporarily disable the static front page in Settings → Reading, direct project page loads open the correct project images in the lightbox. When I set /news as the static front page again, the issue returns.So it looks like the Lightbox Addon may be collecting hidden APL/frontpage images from the DOM on direct project page load, instead of only collecting images from the current project content.
This happens even though the frontpage/news page itself does not have Lightbox enabled.
-
Hey, thanks for the heads up. This will be fixed with the next update.
-
-
it was released yesterday
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login