Support » Plugin: Photoswipe for NextGEN Gallery » Plugin Code Error, Fix Request

  • Resolved ejb5oh



    Its me again. Your plugin rocks and I cannot live without it. I had a good buddy of mine research a problem recently and the problem was found to have been created by your plugin.

    My issue, I am using the Alyeska Theme by Jason Bobitch. When I use photoswipe, it seems to apply the javascript settings to every page on my site without knowing if a photo gallery was present or not on the page that it loads. In doing so, it would screw up navigation and screwed up tabbed content. My coder found the issue and fixed it.

    I am sure this is not only affecting this theme, but probably affecting many others. I ask that you please consider the following fixes as prescribed by my coder:

    The following error occurs when browsing any page that does not have a gallery set up on a mobile device:

    Uncaught Code.PhotoSwipe.createInstance: No images to passed.

    The fix is to only call the photoSwipe() function if there is a gallery on the page. In ngg-photoswipe.js, we simply return if there are no thumbnail images before the main call to photoSwipe():

    //Ready for photoSwipe!
    if (jQuery(‘.ngg-gallery-thumbnail a’).length == 0)
    jQuery(“.ngg-gallery-thumbnail a”).photoSwipe({

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin Code Error, Fix Request’ is closed to new replies.