• Resolved dlmweb

    (@dlmweb)


    Hello,
    I have eleven client websites that are showing critical errors after attempting to update to 5.9 today. I can’t find the common thread yet… different hosts, different themes, different plugins. For the one in which the debugger is turned on, below is a snippet of the error messages:

    [26-Jan-2022 03:37:30 UTC] PHP Warning:  require_once(/home/pastries/public_html/wp-includes/php-compat/readonly.php): Failed to open stream: No such file or directory in /home/pastries/public_html/wp-includes/general-template.php on line 4869
    [26-Jan-2022 03:37:30 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/home/pastries/public_html/wp-includes/php-compat/readonly.php' (include_path='.:/opt/alt/php80/usr/share/pear:/opt/alt/php80/usr/share/php:/usr/share/pear:/usr/share/php') in /home/pastries/public_html/wp-includes/general-template.php:4869
    Stack trace:
    #0 /home/pastries/public_html/wp-settings.php(188): require()
    #1 /home/pastries/public_html/wp-config.php(116): require_once('/home/pastries/...')
    #2 /home/pastries/public_html/wp-load.php(50): require_once('/home/pastries/...')
    #3 /home/pastries/public_html/wp-blog-header.php(13): require_once('/home/pastries/...')
    #4 /home/pastries/public_html/index.php(17): require('/home/pastries/...')
    #5 {main}
      thrown in /home/pastries/public_html/wp-includes/general-template.php on line 4869

    Many thanks for taking a look!

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

Viewing 15 replies - 1 through 15 (of 15 total)
  • Woah, @shrutie … read the room, dude!

    Thread Starter dlmweb

    (@dlmweb)

    Update: I download a clean copy of 5.9 and then ftp’d the file up to my own website (also throwing a critical error). This brought my website back up.

    I then tried that same fix for the pastries website. No luck. Still throwing a critical error. However, the debug log is showing different PHP fatal errors. This time the error relates to the script-loader.php

    [26-Jan-2022 13:11:15 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function wp_get_global_stylesheet() in /home/pastries/public_html/wp-includes/script-loader.php:2322
    Stack trace:
    #0 /home/pastries/public_html/wp-includes/class-wp-hook.php(307): wp_enqueue_global_styles('')
    #1 /home/pastries/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #2 /home/pastries/public_html/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
    #3 /home/pastries/public_html/wp-includes/script-loader.php(2105): do_action('wp_enqueue_scri...')
    #4 /home/pastries/public_html/wp-includes/class-wp-hook.php(307): wp_enqueue_scripts('')
    #5 /home/pastries/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
    #6 /home/pastries/public_html/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
    #7 /home/pastries/public_html/wp-includes/general-template.php(3042): do_action('wp_head')
    #8 /home/pastries/public_html/wp-content/themes/genesis/header.php(35): wp_head()
    #9 /home/pastries/public_html/wp-includes/template.php(770): require_once('/home/pastries/...')
    #10 /home/pastries/public_html/wp-includes/template.php(716): load_template('/home/pastries/...', true, Array)
    #11 /home/pastries/public_html/wp-includes/general-template.php(48): locate_template(Array, true, true, Array)
    #12 /home/pastries/public_html/wp-content/themes/genesis/lib/framework.php(24): get_header()
    #13 /home/pastries/public_html/wp-content/plugins/genesis-connect-woocommerce/templates/single-product.php(77): genesis()
    #14 /home/pastries/public_html/wp-includes/template-loader.php(106): include('/home/pastries/...')
    #15 /home/pastries/public_html/wp-blog-header.php(19): require_once('/home/pastries/...')
    #16 /home/pastries/public_html/index.php(17): require('/home/pastries/...')
    #17 {main}
      thrown in /home/pastries/public_html/wp-includes/script-loader.php on line 2322

    Would love a response here.
    Thank you.

    Hello fellas, I had the same issue when updating a few sites.
    I solved the problem as follows: CPanel > PHP Selector > Restore to Default
    Note: I’m using PHP version 8.0

    Thread Starter dlmweb

    (@dlmweb)

    @douglasdmca I’m running 7.4 on most client sites, mainly because this WordPress post from a couple of weeks ago –
    https://make.www.ads-software.com/core/2022/01/10/wordpress-5-9-and-php-8-0-8-1/
    says “WordPress is not fully compatible with PHP 8.0 or 8.1. Whatever. Who knows.

    What fixed *most* of my clients sites was to download a clean copy of WordPress 5.9 and ftp the /wp-admin and /wp-includes folders up to the server.

    But a couple of client sites I had to just roll back to 5.8.3 using the same method above.

    Two other client sites weren’t returning a “critical error” but were definitely wonky. Re-saving the permalinks appears to have fixed those issues.

    And over 100 client sites updated 5.9 without issue. So it’s been all over the map with no common thread. Hellish day for sure.

    Issue Solved!

    Hello, I had the same issue and it was solved:
    -> Downloading the fresh copy of WordPress
    -> Extract the zip file
    -> Look for the wp-includes folder and make it zip
    -> Now remove the wp-includes folder from your Cpanel and then upload the new wp-includes folder you just zipped
    -> Extract the new wp-includes folder in cpanel
    -> You are done and the site is live

    Thank you!

    Thread Starter dlmweb

    (@dlmweb)

    All my sites have been fixed one way or another, but I’m a bit disappointed that a major update can cause “critical errors” on 15 websites – all pointing to files in the /wp-includes folder – and no one from WordPress responds to the ticket.

    @dlmweb – having the same issue on our site. I can’t find any responses from WordPress. I’ll try your method of replacing the /wp-admin and /wp-includes folders. Thanks!

    • This reply was modified 2 years, 9 months ago by 64footdan.

    Hi there,
    you need to copy wp-settings.php from WordPress.zip to your project

    Same here on our production multisite server. The automatic upgrade said it had failed, but I was still able to navigate network admin. Several site home pages gave critical errors, caused by this

    PHP Fatal error: Uncaught Error: Call to undefined function wp_get_global_stylesheet() in /var/www/html/wp-includes/script-loader.php on line 2322

    I temporarily commented out that line, (the following line simply returns, if stylesheet is empty,) and no more error. I hate hacking core code to fix a fatal error…

    However, now our server says it’s running 5.9, despite the upgrade failure. I will follow advice above, and replace the mentioned subdirectories.

    @dcsolida try copying wp-settings.php from the archive. everything will be fixed

    @zanton I replaced wp-settings.php and wp-includes/script-launcher.php (that I had modified) and all appears to be well. Thanks!

    @zanton THANK YOU! That did the trick!
    Thank you!

    you need to copy wp-settings.php from WordPress.zip to your project

    @zanton thanks, worked for me!

    I have two sites running older version of WordPress and I just tried to manually update them to 5.9.2 via Dashboard. On both sites the update failed and said critical error and that I was sent an email with more information, but no emails received. Both websites are still working normally though, only the update failed.

    I have now manually downloaded a copy of wordpress-5.9.2.zip – If I understand this thread correctly I just need to extract the wp-settings.php file from the Zip file and then replace the file on my WordPress sites with the new wp-settings.php file and I am done?

    Thank you.

    Hi Guys, I have the same problem on my site – the horrible critical error message.

    BIG PROBLEM number 2 is I am not skilled to do the stuff you mentioned above. So how on earth do I have it solved?

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘WP 5.83 – 5.9 update – websites showing critical error’ is closed to new replies.