nanostudio-org / nanogallery2

a modern photo / video gallery and lightbox [JS library]
https://nanogallery2.nanostudio.org
761 stars 112 forks source link

JQuery 3.6.3 Error on upgrade from JQuery 3.5.1 #393

Closed AntSmith60 closed 1 year ago

AntSmith60 commented 1 year ago

Describe the issue
I tried to upgrade JQuery on my site from 3.5.1 to 3.6.3 after which attempting to open an image in the pop-up lightbox (not a gallery, just a single image) I got a Syntax Error reported in the console stating:

Uncaught Error: Syntax error, unrecognized expression: [data-nanogallery2-Lightbox

Reverting to JQuery 3.5.1 resolved the issue.

I don't actually need to update JQuery right now so I am more reporting this as FYI as thought you'd like to be aware if you are not already!

CODE PLAYGROUND
I don't have one but here is the image tag where I noticed the issue:

image illustrating Photographic Skill, The Book

URL of your page
The page with the above img tag is: https://antsmith.net/photography/photographic-skill/tag/skill I have reverted to JQuery 3.5.1 so you won't see the issue replicated here

Berenke commented 1 year ago

It's just a typing mistake. Open the jquery.nanogallery(.min).js file in a text editor, and search this expression: "[data-nanogallery2-lightbox". In the first hit you will see there's the closing square bracket is missing. Insert it, save the file and voila! :-)

aten-dev-avalade commented 1 year ago

I also solved it myself before finding this report. Just replace '[data-nanogallery2-Lightbox' with '[data-nanogallery2-Lightbox]'. Hopefully the developer will release a new update soon, or someone could fork it and maintain it The last commit was Feb 27, 2021, which is worrying.