• Resolved perfectword7

    (@perfectword7)


    Howdy. We are wanting to upgrade to PHP 8.1 on our WordPress site; however, we get a “Critical Error” only on the mapped domain when we do so. Screen shot: https://prnt.sc/1Vi3QJTc81l-

    The rest of the site runs fine on PHP 8.1. We have verified this on both our staging and live sites, multiple browsers, multiple machines. We are using Enfold Premium theme. The plugin works normally at PHP 7.4, but with 8.1 it breaks.

    What do you advise? Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter perfectword7

    (@perfectword7)

    I turned on debug. It looks like a conflict with LayerSlider or Enfold. Again, this works fine in PHP 7.4. I just get this with PHP 8.1.

    Fatal error: Uncaught TypeError: Unsupported operand types: string + int in /home/account/sub.staging.domain.com/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/slideshow_layerslider/slideshow_layerslider.php:153 Stack trace: #0 /home/account/sub.staging.domain.com/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/class-shortcode-template.php(1332): avia_sc_layerslider->shortcode_handler(Array, ”, ‘av_layerslider’, Array) #1 /home/account/sub.staging.domain.com/wp-includes/shortcodes.php(433): aviaShortcodeTemplate->shortcode_handler_prepare(Array, ”, ‘av_layerslider’) #2 [internal function]: do_shortcode_tag(Array) #3 /home/account/sub.staging.domain.com/wp-includes/shortcodes.php(273): preg_replace_callback(‘/\[(\[?)(email|…’, ‘do_shortcode_ta…’, ‘[av_layerslider…’) #4 /home/account/sub.staging.domain.com/wp-includes/class-wp-hook.php(324): do_shortcode(‘[av_layerslider…’) #5 /home/account/sub.staging.domain.com/wp-includes/plugin.php(205): WP_Hook->apply_filters(‘[av_layerslider…’, Array) #6 /home/account/sub.staging.domain.com/wp-content/themes/enfold/template-builder.php(102): apply_filters(‘the_content’, ‘[av_layerslider…’) #7 /home/account/sub.staging.domain.com/wp-includes/template-loader.php(106): include(‘/home/account…’) #8 /home/account/sub.staging.domain.com/wp-blog-header.php(19): require_once(‘/home/account…’) #9 /home/account/sub.staging.domain.com/index.php(17): require(‘/home/account…’) #10 {main} thrown in /home/account/sub.staging.domain.com/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/slideshow_layerslider/slideshow_layerslider.php on line 153

    Thread Starter perfectword7

    (@perfectword7)

    Sorry, one more thing. I am running the current version of Enfold and WP. Layerslider is included in Enfold. I do not run it as a separate plugin. Thanks.

    Plugin Author matthias.wagner

    (@matthiaswagner)

    hello! our plugin is tested with php8.

    in your stack trace i can only see affected files from enfold. why do you think that domain mapping is the problem here?

    Thread Starter perfectword7

    (@perfectword7)

    Thank you so much for the reply.

    I was assuming the issue was with domain mapping because that’s the only place on the whole site a PHP error is generated when moving from PHP 7.4 to PHP 8.1.

    So since everything works correctly in PHP 7.4, then the incompatibility between domain mapping and enfold only shows itself in PHP 8.x.

    Do you have a suggestion how I should proceed? Something I can try to fix it?

    Thanks again!

    Thread Starter perfectword7

    (@perfectword7)

    Wow. I ran the error through ChatGPT. The fix was easy. Just had to fix a line of code in the Enfold theme. Sorry to bother you!

    If anyone else comes across the same problem, in wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/slideshow_layerslider/slideshow_layerslider.php line 153 is

    $params[‘style’] = ” style=’height: ” . ( $height + 1 ) . “px;’ “;

    Change it to

    $params[‘style’] = ” style=’height: ” . ( (int) $height + 1 ) . “px;’ “;

    Plugin Author matthias.wagner

    (@matthiaswagner)

    glad to hear that. thank you for the update ??
    if you like our plugin, we would be happy if you can leave us a 5* review ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Critical Error with PHP 8.1’ is closed to new replies.