Title: Plugin Code Error, Fix Request
Last modified: August 20, 2016

---

# Plugin Code Error, Fix Request

 *  Resolved [ejb5oh](https://wordpress.org/support/users/ejb5oh/)
 * (@ejb5oh)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-code-error-fix-request/)
 * Hello,
 * 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!
   >  jQuery(function(){ if (jQuery(‘.ngg-gallery-thumbnail
   > a’).length == 0) return; jQuery(“.ngg-gallery-thumbnail a”).photoSwipe({ …
 * [http://wordpress.org/extend/plugins/photoswipe-for-nextgen-gallery/](http://wordpress.org/extend/plugins/photoswipe-for-nextgen-gallery/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [ejb5oh](https://wordpress.org/support/users/ejb5oh/)
 * (@ejb5oh)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-code-error-fix-request/#post-3216861)
 * Thank you for this awesome plugin!! just trying to help out.
 *  Plugin Author [Guillermo](https://wordpress.org/support/users/gsenas/)
 * (@gsenas)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-code-error-fix-request/#post-3216894)
 * Check out the new version (1.2) this issue should be fixed.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Plugin Code Error, Fix Request’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/photoswipe-for-nextgen-gallery.svg)
 * [Photoswipe for NextGEN Gallery](https://wordpress.org/plugins/photoswipe-for-nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/photoswipe-for-nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/photoswipe-for-nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/photoswipe-for-nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/photoswipe-for-nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/photoswipe-for-nextgen-gallery/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Guillermo](https://wordpress.org/support/users/gsenas/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-code-error-fix-request/#post-3216894)
 * Status: resolved