Title: lightbox doesnt load
Last modified: May 5, 2020

---

# lightbox doesnt load

 *  Resolved [iamazified](https://wordpress.org/support/users/iamazified/)
 * (@iamazified)
 * [6 years ago](https://wordpress.org/support/topic/lightbox-doesnt-load/)
 * after the last update the lightbox doesnt work and clicking the images links 
   to their own url.
    -  This topic was modified 6 years ago by [iamazified](https://wordpress.org/support/users/iamazified/).

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

 *  Thread Starter [iamazified](https://wordpress.org/support/users/iamazified/)
 * (@iamazified)
 * [6 years ago](https://wordpress.org/support/topic/lightbox-doesnt-load/#post-12781649)
 * solved. sorry guys, it was a bug…
 *  [smeedijzeronline](https://wordpress.org/support/users/smeedijzeronline/)
 * (@smeedijzeronline)
 * [6 years ago](https://wordpress.org/support/topic/lightbox-doesnt-load/#post-12832477)
 * Got the same problem, how did you fix it?
 *  [1mag3](https://wordpress.org/support/users/1mag3/)
 * (@1mag3)
 * [6 years ago](https://wordpress.org/support/topic/lightbox-doesnt-load/#post-12840373)
 * If your css/js are cached and minified, clearing your cache could solve this 
   issue
 *  Plugin Author [Arno Welzel](https://wordpress.org/support/users/awelzel/)
 * (@awelzel)
 * [6 years ago](https://wordpress.org/support/topic/lightbox-doesnt-load/#post-12840604)
 * In addition:
 * If you use a caching system make sure that the cache is **always** refreshed 
   after updating WordPress or any theme or plugin.
 * Also you should **never** remove version parameters of included scripts to avoid
   conflicts caused by browsers still using the old cached version of a script. 
   Also see here about this:
 * [https://arnowelzel.de/en/versioning-of-static-resources-in-wordpress](https://arnowelzel.de/en/versioning-of-static-resources-in-wordpress)
 * Lightbox with Photoswipe changed a lot between version 2.92 and 2.100. The frontend
   script of version 2.92 or 2.94 is **not** compatible with newer backends like
   2.100. Having a cached version of 2.92 or 2.94 and the backend of 2.100 will 
   not work.
 *  [acidzero](https://wordpress.org/support/users/acidzero/)
 * (@acidzero)
 * [6 years ago](https://wordpress.org/support/topic/lightbox-doesnt-load/#post-12861753)
 * After the update I’m having this problem, too, but in random pages! I use Litespeed
   cache and purged everything twice. Asset Cleanup too. And I disabled both to 
   try. But in that specific page Lightbox doesn’t work:
    [https://www.saindodamatrix.com.br/planos-vibratorios/](https://www.saindodamatrix.com.br/planos-vibratorios/)
 * when I click the image i get this in dev:
    frontend.min.js?ver=2.100:1 Uncaught
   TypeError: Cannot read property ‘getAttribute’ of null at frontend.min.js?ver
   =2.100:1 at NodeList.forEach (<anonymous>) at parseThumbnailElements (frontend.
   min.js?ver=2.100:1) at openPhotoSwipe (frontend.min.js?ver=2.100:1) at HTMLAnchorElement.
   <anonymous> (frontend.min.js?ver=2.100:1)
 * In the others it works, but there’s always the message
    Uncaught ReferenceError:
   Swiper is not defined at body-41e44f0460e34800310d79faba5c2915966b10fc-1.js:294
   at body-41e44f0460e34800310d79faba5c2915966b10fc-1.js:294
 *  Plugin Author [Arno Welzel](https://wordpress.org/support/users/awelzel/)
 * (@awelzel)
 * [6 years ago](https://wordpress.org/support/topic/lightbox-doesnt-load/#post-12862453)
 * The error makes no sense to me, as the same code works on many other sites without
   any issues. Just to be sure please turn off any caching and “script optimization”
   so the JavaScript assets get loaded as they are provided with the plugins and
   not as one single minified file for all scripts on your site.
 * Also keep in mind that the server on which your website is hosted already uses
   HTTP/2 – so minifiying everything to one single file will not improve the performance
   anyway since with HTTP/2 browsers request included CSS and JavaScript files in
   one single connection and parallel. It makes no difference if there is only one
   file or many.
 * For example – open my website [https://arnowelzel.de](https://arnowelzel.de) 
   and use the web developer tools of your browser to see the “waterfall” for the
   HTTP requests in the network tab. Due to HTTP/2 many elements get requested at
   the same time and downloaded in parallel. Also see this screenshot:
 * [https://nextcloud.0x0c.de/s/afKiQo4GrSgFL7S/preview](https://nextcloud.0x0c.de/s/afKiQo4GrSgFL7S/preview)

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

The topic ‘lightbox doesnt load’ is closed to new replies.

 * ![](https://ps.w.org/lightbox-photoswipe/assets/icon-256x256.png?rev=2906302)
 * [Lightbox with PhotoSwipe](https://wordpress.org/plugins/lightbox-photoswipe/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lightbox-photoswipe/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lightbox-photoswipe/)
 * [Active Topics](https://wordpress.org/support/plugin/lightbox-photoswipe/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lightbox-photoswipe/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lightbox-photoswipe/reviews/)

 * 6 replies
 * 5 participants
 * Last reply from: [Arno Welzel](https://wordpress.org/support/users/awelzel/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/lightbox-doesnt-load/#post-12862453)
 * Status: resolved