Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade/Install: Disable maintenance mode when a core auto-update is skipped. #6847

Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/wp-admin/includes/class-wp-automatic-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@ public function update( $type, $item ) {
&& ( 'up_to_date' === $upgrade_result->get_error_code()
|| 'locked' === $upgrade_result->get_error_code() )
) {
// Allow visitors to browse the site again.
$upgrader->maintenance_mode( false );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically and logically, this change makes sense.

It bothers me that I'm not (yet) able to reproduce the issue of the maintenance lock.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if I’ve been bitten by this in the past in local dev environments. Tonya, my guess is the only way to test is to modify the $upgrade_result to a WP_ERROR.


/*
* These aren't actual errors, treat it as a skipped-update instead
* to avoid triggering the post-core update failure routines.
Expand Down
Loading