• Hi,
    Everything was going well till the 6.0 wordpress update. My site crashed and is showing this error:
    Fatal error: Cannot redeclare wp_enqueue_block_style() (previously declared in /home/www/casadelparquecw.com/lukyvan0211/wp-includes/script-loader.php:2937) in /home/www/casadelparquecw.com/lukyvan0211/wp-includes/blocks.php on line 1206

    Tried disabling all plugins, disabling astra theme, didn’t worked.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Do you have the “wp_enqueue_block_style()” function in your function.php file or elsewhere?

    To be sure, you can load the default WP theme and check if you still have the error.

    It’s strange, there is no “wp_enqueue_block_style()” function in blocks.php normally.
    Source :
    https://github.com/WordPress/WordPress/blob/master/wp-includes/blocks.php#L1206

    • This reply was modified 2 years, 9 months ago by gotgotf.
    • This reply was modified 2 years, 9 months ago by gotgotf.
    • This reply was modified 2 years, 9 months ago by gotgotf.
    • This reply was modified 2 years, 9 months ago by gotgotf.
    Thread Starter Luciano Herrera

    (@lukyvan0211)

    “wp_enqueue_block_style()” function is not called on function.php file.
    fixed the error temporarily by removing the function from blocks.php and commenting this lines in index.php file from blocks folder:

    //require ABSPATH . WPINC . ‘/blocks/comment-reply-link.php’;
    //require ABSPATH . WPINC . ‘/blocks/comment-template.php’;
    //require ABSPATH . WPINC . ‘/blocks/query-no-results.php’;
    //require ABSPATH . WPINC . ‘/blocks/read-more.php’;

    “It’s strange, there is no “wp_enqueue_block_style()” function in blocks.php normally.”
    Actually there is, but it’s in version 5.9:

    https://github.com/WordPress/WordPress/blob/6437203f0997da70714a6c4ff9cdcd96cc6ddf8f/wp-includes/blocks.php#L1206

    I had a same issue and I think it’s because your WordPress installation has version 5.9 and 6.0 mixed together for some reason. In my case it happened because I tried to restore earlier backup (5.9) after upgrading to 6.0.

    Hello,
    Hope you’re all well. I came across this post, as I was browsing for some help. I upgraded to the lastest WP version, upgraded tp PHP 8.1 and I am now stuck with this message :
    Fatal error: Array and string offset access syntax with curly braces is no longer supported in /homepages/25/d584099293/htdocs/clickandbuilds/X3DGROUP/wp-includes/script-loader.php on line 706

    My websmater is away on vacation this week and I’d appreciate some help here.
    Thanks

    Kamal

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘fatal error script-loader.php’ is closed to new replies.