• Resolved vcb

    (@vcb)


    Hi there,

    I’ve been developing a page on localhost on PHP 7.4
    The server runs on php 8.2 and I guess this is the root cause the problem I’m having.

    It looks like everything is functioning normal beside the js. So instead of opening the image(s) in the lightbox they go straight to a new TAB showing only the image.

    Any idea how I can get this working for php8?
    Thank you very much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter vcb

    (@vcb)

    Also I don’t really understand why the PHP causes JS troubles.
    Do you suspect any code-part?

    Plugin Author Arno Welzel

    (@awelzel)

    There is no “JS trouble”. The frontend does not change with PHP 8.2, the backend does. And if the backend fails to add the neccessary data-attributes to the image links which the frontend needs, then the images will not open in a lightbox.

    Lightbox with Photoswipe also works fine with PHP 8.2. However since PHP 8.1 introduced some breaking changes it is very likely that some other plugin or your theme may not be ready for PHP 8.1 or 8.2 yet and causes some problem. Please check the logs of your web server for any error messages and also check if all plugins and your theme officially supports PHP 8.1 or newer.

    Since PHP 8.0 still gets security updates until November 2023 (also see https://www.php.net/supported-versions.php), you may also just upgrade to that version. It’s very likely that this may work better.

    Thread Starter vcb

    (@vcb)

    @awelzel : thank you so much. Your input helped me to see it from a different perspective… Error was related to some custom code within functions.php.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem after migrating to PHP 8.x’ is closed to new replies.