• Resolved johnravrasta

    (@johnravrasta)


    After upgrading my WP theme from 21 to 24, lightbox plugin does not work. It seems that there is an incompatibility with the new theme 24 internal lightbox. Do you know if this is the case and if there is a workaround in order to continue using this plugin ?

    thank you

    • This topic was modified 10 months, 2 weeks ago by johnravrasta.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    What means “theme from 21 to 24”? What is the complete name of the theme you use? And what “internal lightbox” are you talking about?

    If you are talking about the WordPress theme “Twenty Twenty-Four” – there is no “internal lightbox” with that and PhotoSwipe works fine with it. Maybe you installed or updated a gallery plugin which comes with its own lightbox.

    Thread Starter johnravrasta

    (@johnravrasta)

    Hi Arno and thanks for your reply. So, yeap, i upgraded from “Twenty Twenty-one” to “Twenty Twenty-Four”. Nothing else. So, lightbox stopped working in native WordPress galleries in all my posts and also in some images that had a link to open in higher res.

    You may see a live example here: One site is the live and the other is a test/back up exact replica that i hide from search engines. The live website, where the lightbox effect works normally is using the “Twenty Twenty-one” WordPress them and the test website is using the “Twenty Twenty-Four” latest WordPress native theme.

    Live website article with “Twenty Twenty-one” theme: https://travelphoto.gr/stemnitsa-village-arcadia/#photos

    Test website with “Twenty Twenty-Four” theme: https://tptest.travelphoto.gr/stemnitsa-village-arcadia/#photos

    on test website, if i revert back to “Twenty Twenty-one” theme, Lightbox effect works again.

    So, without changing anything than the theme, i conclude there must be an incompatibility of the Lightbox with PhotoSwipe?plugin with the new “Twenty Twenty-Four” latest WordPress native theme. What do you think?

    Plugin Author Arno Welzel

    (@awelzel)

    The second example page at https://tptest.travelphoto.gr/stemnitsa-village-arcadia/#photos does not use the plugin at all. See the page source – there is no reference to any of the plugin files at all.

    Either you have not installed the plugin or it is disabled for that specific page.

    Thread Starter johnravrasta

    (@johnravrasta)

    I deeply apologize for this, did not expect to have such a quick response so i disabled it for 5 minutes, trying to understand what is going on…. ??

    I finally found that it is something in the Yoast SEO plugin that when active stops your plugin from working. When i deactivate it then it comes back to normal! Did not expect Yoast to create such an issue…. Now, i activated your plugin and Yoast in order to “see” them together.

    Again, my apologies

    Thread Starter johnravrasta

    (@johnravrasta)

    Just to add, Yoast is active on the live website and your plugin works fine with it. When i updated to the new WP theme (twenty four) lightbox stopped. I deactivated all plugins, activating one after the other, this is how i realized Yoast breaks functionality! Do not understand why. Will make a very quick theme upgrade on my live website to see it this happens there as well and let you know

    Thread Starter johnravrasta

    (@johnravrasta)

    the same happens on the live website
    The conclusion is that all other things being equal, upgrading to WP theme “twenty twenty four” breaks Lightbox Photoswipe functionality. Maybe there is something inside Yoast plugin that creates this issue, don’t know. Unfortunately, i cannot continue with Yoast deactivated so will probably need to find a Lightbox alternative that will not have this issue.

    Let me know if you understand how to fix this anyway.
    many thanks

    Plugin Author Arno Welzel

    (@awelzel)

    In general I strongly recommend against any kind of “SEO” or “make my website faster and you don’t have understand how it works” plugins because of these issues.

    In fact there is no real “optimization” for search engines. Content is king – if you have good content and keep the URLs of your articles and pages valid (which means: do not rename pages or delete content regularly), this is much more important than any “optimization”. Yoast may help you to better understand why your content is not ideal to be visible – but technically it can do nothing to improve your websites visibility if there is no good content or if URLs constantly change and get invalid over time without keeping the old ones as redirection. Do not trust any “website checks” which claim to tell you if your site as good “SEO” or not.

    Also avoid “optimization” like “remove version from URL” etc. (see https://arnowelzel.de/en/versioning-of-static-resources-in-wordpress about this). There is a reason why WordPress adds version information as parameter to the URL.

    Another problem which often happens is JavaScript “optimization”: combining all scripts into one single file or moving all scripts to the footer (or both together). This will damage Lightbox with PhotoSwipe in most cases since it is using modules and they will fail if the original structure visible to the browser is changed. My plugin is already optimized as far as possible – all scripts are already minified and compressed and can not be optimized any further. So if there is an option to disable any “optimization” for my plugin, try to enable that.

    And if Yoast does any kind of caching this may also be a problem if Yoast caches the template output before my plugin had any chance to add the required data attributes to the image links. If you need to improve loading times, either use plugins like Cachify which only cache the final rendered page as static HTML or if possible use a Redis server and the Redis object cache, which is also actively supported by my plugin (https://www.ads-software.com/plugins/redis-cache/). Or use a CDN like CloudFlare and avoid direct requests to your server completely.

    Thread Starter johnravrasta

    (@johnravrasta)

    almost fully agree with the above and also have a look at your proposals, thank you very much.

    I use Yoast mostly for getting a rough idea about following some title, description and internal links tips and suggestions. And i generally try to keep at possible minimum most minified/optimized tips from various “magic” plugins that most of the times are more marketing than other.
    Will try to play a little bit with Yoast options and see what may cause this issue, otherwise i completely remove it and see if i can find any other alternative only for basic website checking.

    thanks again

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Theme 24 lightbox not working’ is closed to new replies.