Make WordPress Core

Opened 14 months ago

Closed 14 months ago

Last modified 4 months ago

#58059 closed defect (bug) (invalid)

Critical error after updating to core 6.2

Reported by: carolkg's profile carolkg Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.2
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description

After updating to WordPress 6.2, I get "There has been a critical error on this website." on 2 sites that reside in subdirectories on GoDaddy. (when trying sitename/wp-admin I just get a blank page). I also had a test wordpress site in another subdirectory that was working fine, so just to see what happens I updated that one too and now get the same critial error message.

This is what's in the error log of one site: rosemaryglennon.com that resides in a subfolder of ckgwebdev.com. The subfolder name is rosemaryglennon:
[31-Mar-2023 20:24:24 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to WP_HTTP_Requests_Response::construct() must be an instance of Requests_Response, instance of WpOrg\Requests\Response given, called in /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/class-wp-http.php on line 398 and defined in /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/class-wp-http-requests-response.php:42
Stack trace:
#0 /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/class-wp-http.php(398): WP_HTTP_Requests_Response->
construct(Object(WpOrg\Requests\Response), NULL)
#1 /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/class-wp-http.php(615): WP_Http->request('http://rosemary...', Array)
#2 /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/http.php(179): WP_Http->post('http://rosemary...', Array)
#3 /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/cron.php(930): wp_remote_post('http://rosemary...', Array)
#4 /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/cron.php(1002): spawn_cron(168029 in /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/class-wp-http-requests-response.php on line 42
[31-Mar-2023 20:34:35 UTC] PHP Fatal error: Uncaught Error: Call to undefined function wp_get_word_count_type() in /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/script-loader.php:1840
Stack trace:
#0 /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/class-wp-hook.php(308): wp_just_in_time_script_localization()
#1 /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(
, Array)
#2 /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#3 /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/script-loader.php(2146): do_action('wp_print_script...')
#4 /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/class-wp-hook.php(308): wp_print_head_scripts()
#5 /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(Array, Array)
#6 /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#7 /home/sk3ng3lf7dul/public_html/rosemaryglenno in /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-includes/script-loader.php on line 1840

Change History (15)

#1 follow-up: @costdev
14 months ago

  • Keywords reporter-feedback added

Hi @carolkg, welcome to Trac!

Can you tell us what plugins and themes are active on both the main site and the test site? Thanks!

#2 @costdev
14 months ago

Hi @carolkg,

In addition, looking at the path in the error log, it looks like the rosemaryglennon website is directly in the public_html directory, rather than in a subdirectory of the ckgwebdev website as you initially described.

Can you re-check and clarify the setup for us? Thanks!

#3 in reply to: ↑ 1 @carolkg
14 months ago

Replying to costdev:

Hi @carolkg, welcome to Trac!

Can you tell us what plugins and themes are active on both the main site and the test site? Thanks!

Hi Colin. Thanks for looking into this. The setup goes like this: ckgwebdev.com files are in public_html and the website is written from scratch in html, not wordpress. It's working fine. There are several folders in public_html. rosemaryglennon is a folder. Within that folder is the wordpress setup for rosemaryglennon.com. In the other folders are a couple of html websites that are working fine. Then there are two wordpress installations - neither of which I can access from a browser. One is a test site called njbellydancing - it's in the very first stages and I'm not too concerned with it. The other is a live site called just4kix.org that resides in a folder called just4kixs. That one is my most critical and I deleted it and am trying to restore it (but my BackupBuddy install is hanging up - I have a ticket with them too!). So, technically there's nothing in that folder but a zip file and importbuddy.php.

So for themes and plugins:
rosemaryglennon.com: Theme twentytwelve (active) and twentytwentythree.
Plugins: backupbuddy, ithemes-sync, no-right-click-images-plugin, photo-gallery and simple-custom-css
njbellydancing (no live website yet): Theme Go (active) and twentytwentythree
Plugins: akismet (not active), coblocks, and limit-login-attempts-reloaded

The other active site, just4kixs.org that's in the just4kixs folder was using the theme Giving Press Lite - I'm sorry, I didn't make a note of the plugins and I have no access to the files to find out. But, as I said, none of that is in there right now.

Let me know if I explained all that clearly or if you have any other questions. Thanks!
Carol

#4 follow-up: @peterwilsoncc
14 months ago

@carolkg Are you able to check your log files to see if you are getting any deprecation notices beginning with the text "The PSR-0 Requests_... class names in the Request library are deprecated"?

If so, it would be great if you could provide a stack trace for that too.

#5 in reply to: ↑ 4 @carolkg
14 months ago

Replying to peterwilsoncc:

@carolkg Are you able to check your log files to see if you are getting any deprecation notices beginning with the text "The PSR-0 Requests_... class names in the Request library are deprecated"?

If so, it would be great if you could provide a stack trace for that too.

@peterwilsoncc I looked and have no notices like that.

There was only one other warning back in Sept 2022:
[30-Sep-2022 08:44:47 UTC] PHP Warning: Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in /home/sk3ng3lf7dul/public_html/rosemaryglennon/wp-settings.php on line 33

I don't remember when I updated PHP to 7.4 but it's likely been at least a year.

#6 follow-ups: @costdev
14 months ago

Hi @carolkg, thanks for the information!

As there isn't a mutual theme or plugin across all the sites, let's look elsewhere.

PHP Warning: Use of undefined constant ABSPATH in wp-settings.php on line 33

I've checked all uses of wp-settings.php in WordPress Core and all cases ensure that ABSPATH is defined.

Your wp-config.php file should have the following towards the end:

if ( ! defined( 'ABSPATH' ) ) {
    define( 'ABSPATH', dirname( __FILE__ ) . '/' );
}

require_once ABSPATH . 'wp-settings.php';

Let us know if these exist at the end of your wp-config.php file, or if they are missing


The Requests related issue, as well as the undefined wp_get_word_count_type() function suggest that the upgrade may have not completed correctly, for some reason.

Can you check the end of wp-includes/l10n.php to see if the wp_get_word_count_type() function is included there?

Last edited 14 months ago by costdev (previous) (diff)

#7 in reply to: ↑ 6 @carolkg
14 months ago

Replying to costdev:

Hi @carolkg, thanks for the information!

As there isn't a mutual theme or plugin across all the sites, let's look elsewhere.

PHP Warning: Use of undefined constant ABSPATH in wp-settings.php on line 33

I've checked all uses of wp-settings.php in WordPress Core and all cases ensure that ABSPATH is defined.

Your wp-config.php file should have the following towards the end:

if ( ! defined( 'ABSPATH' ) ) {
    define( 'ABSPATH', dirname( __FILE__ ) . '/' );
}

require_once ABSPATH . 'wp-settings.php';

Let us know if these exist at the end of your wp-config.php file, or if they are missing


The Requests related issue, as well as the undefined wp_get_word_count_type() function suggest that the upgrade may have not completed correctly, for some reason.

Can you check the end of wp-includes/l10n.php to see if the wp_get_word_count_type() function is included there?

ABSPATH is defined:
/ Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )

define('ABSPATH', dirname(FILE) . '/');

/ Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

BUT there is no wp_get_word_count_type() in wp-includes/l10n.php

#8 in reply to: ↑ 6 @carolkg
14 months ago

Replying to costdev:

Another interesting thing...
I do have the BackupBuddy zip file for the other live site that's showing the WSOD and hanging up in the restore (just4kixs.org). The backup is BEFORE I updated WordPress core to 6.2. I extracted the zip file on my computer and looked in wp-includes/l10n.php and there's also no wp_get_word_count_type(). Also, interestingly - after importBuddy stalls on restoring this site, I end up with wp-admin and wp-content but no wp-includes.

#9 follow-up: @costdev
14 months ago

Thanks @carolkg!

wp_get_word_count_type() was introduced in WordPress 6.2 so upon successful upgrade, this function should be there.

Can you try the following?

  1. Inside the directory of one of the websites, create an old directory.
  2. Move everything into this directory except the wp-content directory and the wp-config.php file.
  3. Upload everything from the WordPress 6.2 package except the wp-content directory.
  4. Let us know:
    • if the site loads and, if so, can you:
      • disable all plugins.
      • go to Dashboard > Updates.
      • click Reinstall 6.2.
      • let us know if the site still works, or if it breaks?

Thanks!

#10 in reply to: ↑ 9 @carolkg
14 months ago

Replying to costdev:

Thanks @carolkg!

wp_get_word_count_type() was introduced in WordPress 6.2 so upon successful upgrade, this function should be there.

Can you try the following?

  1. Inside the directory of one of the websites, create an old directory.
  2. Move everything into this directory except the wp-content directory and the wp-config.php file.
  3. Upload everything from the WordPress 6.2 package except the wp-content directory.
  4. Let us know:
    • if the site loads and, if so, can you:
      • disable all plugins.
      • go to Dashboard > Updates.
      • click Reinstall 6.2.
      • let us know if the site still works, or if it breaks?

Thanks!

You rock!!! The site came up. I got so excited I forgot to disable the plugins and just re-installed 6.2. It took a very long time to finish but the site is up and running. I can't thank you enough! I'll do this for my test site too.

Now I'm kicking myself for deleting the just4kixs site since importbuddy is hanging up on the restore. Hopefully I'll get somewhere with that today.

Thank you so much.

#11 @carolkg
14 months ago

@costdev - one more quick question.

I've managed to get my other live site up and running by doing the same steps you gave me above (plus adding missing media from my backupbuddy zip file). So basically what I have is wordpress core 6.2 but of course, since wp-content wasn't updated it thinks I need to update.

Can I somehow change the version of WordPress without going through the update again? Alternately, I can set up a test directory and run the update there, but I was hoping to avoid that.
Thanks.

#12 follow-up: @costdev
14 months ago

Great to hear you got sites up and running again @carolkg!

So basically what I have is wordpress core 6.2 but of course, since wp-content wasn't updated it thinks I need to update.

Does Dashboard > Updates show a WordPress Core update is necessary, or a theme update?

If a WordPress Core update, what version does it show you running at the bottom right of Dashboard > Updates?

Last edited 14 months ago by costdev (previous) (diff)

#13 in reply to: ↑ 12 @carolkg
14 months ago

Replying to costdev:

Great to hear you got sites up and running again @carolkg!

So basically what I have is wordpress core 6.2 but of course, since wp-content wasn't updated it thinks I need to update.

Does Dashboard > Updates show a WordPress Core update is necessary, or a theme update?

If a WordPress Core update, what version does it show you running at the bottom right of Dashboard > Updates?

Ah, sorry - my mistake. I saw updates were necessary and just one was a plugin so I assumed... (should know by now not to assume). It says I have 6.2. I'm all set. Should I resolve the ticket or do you take care of that.

#14 @kebbet
14 months ago

  • Component changed from Script Loader to Upgrade/Install
  • Keywords reporter-feedback removed
  • Resolution set to invalid
  • Severity changed from major to normal
  • Status changed from new to closed

#15 @swissspidy
4 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.