WordPress.org

Make WordPress Core

Opened 10 months ago

Closed 6 months ago

#48964 closed defect (bug) (fixed)

version 5.3.1 - Critical Errors Updating Plugins & Themes

Reported by: airamerica Owned by: SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: Site Health Keywords: early has-patch
Focuses: Cc:

Description

Discovered last night 9pm est after updating client site. Thought it was an individual plugin or custom setting. After debugging and other automatic core updates performed on other sites with same issue thought it was best to open ticket straight away.

Sites do function but updates fail leaving .maintenance file to be deleted.

Attachments (3)

plugin-update-error2.png (156.5 KB) - added by airamerica 10 months ago.
Screen Shot updating plugin
plugin-update-error.png (29.1 KB) - added by airamerica 10 months ago.
Screen Shot Frozen Maintenance Mode - Does not matter what you update plugins or themes!
48964.patch (559 bytes) - added by Clorith 6 months ago.

Download all attachments as: .zip

Change History (23)

#1 follow-up: @pikamander2
10 months ago

Are you getting any errors in the error log?

#2 @airamerica
10 months ago

Nothing in error log to reflect...
"Update Failed: There has been a critical error on your website. Please check your site admin email inbox for instructions.Learn more about debugging in WordPress."
Disabled plugins that were showing errors in log. Same issue with theme updates!

@airamerica
10 months ago

Screen Shot updating plugin

@airamerica
10 months ago

Screen Shot Frozen Maintenance Mode - Does not matter what you update plugins or themes!

#3 in reply to: ↑ 1 @airamerica
10 months ago

Replying to pikamander2:

Are you getting any errors in the error log?

nope... checking other server logs for clues...

#4 @SergeyBiryukov
10 months ago

  • Component changed from General to Site Health

#5 follow-up: @Clorith
10 months ago

  • Milestone changed from Awaiting Review to 5.4

Hiya, and welcome to trac @airamerica !

My first thought is that this is likely caused by a plugin or theme conflict, I would encourage you to try the update with plugins disabled and a default theme (such as Twenty Twenty), you can read more about troubleshooting in the Support teams post for WordPress 5.3.

As for this ticket, I think it would make sense to make sure the fatal error handling doesn't trigger on plugin/theme updates, since they may temporarily "fail" while files are moved around for example, but work find once the update completes and a page is reloaded, especially if the critical error doesn't affect the site it self, so the email sent would just be confusing to the recipient.

#6 in reply to: ↑ 5 @airamerica
10 months ago

Replying to Clorith:

Hiya, and welcome to trac @airamerica !

My first thought is that this is likely caused by a plugin or theme conflict, I would encourage you to try the update with plugins disabled and a default theme (such as Twenty Twenty), you can read more about troubleshooting in the Support teams post for WordPress 5.3.

As for this ticket, I think it would make sense to make sure the fatal error handling doesn't trigger on plugin/theme updates, since they may temporarily "fail" while files are moved around for example, but work find once the update completes and a page is reloaded, especially if the critical error doesn't affect the site it self, so the email sent would just be confusing to the recipient.

Could not agree more! 57 sites using different themes and plugins had same issue. Gave me a chance to go through wp logs and clean up allot of errors while rolling back to 5.3...

Do my own server administration and immediately thought server configs and logs... Upgrade to 10.3.21-MariaDB and using PHP 7.3 (ea-php73) handler by default....

Also wanted to note that sites work fine with existing plugins and themes.
Only issue is you can't update!

Only reason for this ticket was to report "unusual behavior" and so simple thought someone might have a quick solution for the masses of sites affected. After holidays will figure out...
First time I have posted on this forum... Thumbs up for reply...

#7 in reply to: ↑ description @airamerica
10 months ago

Replying to airamerica:

Discovered last night 9pm est after updating client site. Thought it was an individual plugin or custom setting. After debugging and other automatic core updates performed on other sites with same issue thought it was best to open ticket straight away.

Sites do function but updates fail leaving .maintenance file to be deleted.

All Issues Resolved with 5.3.2
Site updated to 5.2.1 would not allow automatic update to dot 2 however manual file over-write works!
Many Thanks - Happy Holidays

This ticket was mentioned in Slack in #core-site-health by clorith. View the logs.


9 months ago

#9 @Clorith
9 months ago

  • Keywords needs-patch added

#10 @desrosj
9 months ago

For preventing fatal errors when a plugin is updating, there is #34676. During auto-updates, #48850 will also consider fixing this during auto-updates.

#11 @Clorith
9 months ago

Would 34676 also prevent the fatal error handler from triggering in general (I've not looked closely, the patches were fairly substantial)?

I was thinking a simple check in WP_Fatal_Error_Handler::handle() like so would do the trick:

// Triggering during upgrades may cause false positives, so don't handle errors if updating.
if ( file_exists( ABSPATH . '.maintenance' ) ) {
        return;
}

#12 @Clorith
8 months ago

  • Keywords early added
  • Milestone changed from 5.4 to 5.5

Although the change I'm thinking of is simple in theory, I am not confident in pushing it in this late in the cycle, as it may have unexpected edge case outcomes.

I'm moving this to the 5.5 milestone for that reason, and will mark it early so that it gets the proper time to sit for this to be a reliable fix.

This ticket was mentioned in Slack in #core-site-health by afragen. View the logs.


6 months ago

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


6 months ago

#15 @Clorith
6 months ago

#47242 was marked as a duplicate.

This ticket was mentioned in Slack in #core-site-health by afragen. View the logs.


6 months ago

@Clorith
6 months ago

#17 @Clorith
6 months ago

  • Keywords has-patch added; needs-patch removed

48964.patch is simple in nature, only adding a check to the handler and returning early to avoid runnign the full fatal error handle suite, but will be nice to test from early on so that no strange scenarios aren't thought of.

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


6 months ago

#19 @SergeyBiryukov
6 months ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#20 @SergeyBiryukov
6 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 47768:

Site Health: Do not trigger the fatal error handler while updates are being installed.

Triggering the error handler during updates may cause false positives. For example, updates may temporarily "fail" while files are moved around, but work fine once completed. Sending emails about temporary failures would just be confusing to the recipient.

Props Clorith, airamerica.
Fixes #48964.

Note: See TracTickets for help on using tickets.