Upgrade/Install: Don't toggle maintenance mode on translation updates.

The Rollback Auto-Update feature introduced additional maintenance mode toggling.

After installing WordPress in a non-English (US) language, translation updates are performed automatically. As there may be a large number of updates for Core and bundled themes, users will be presented with a maintenance notice upon visiting the newly installed website.

To avoid concerning users that the website has failed to install correctly, this excludes translation updates from triggering the additional maintenance mode toggling.

Follow-up to [58128].

Props benniledl, afragen, rajinsharwar, costdev.
Fixes #61260. See #58281.
Built from https://develop.svn.wordpress.org/trunk@58308


git-svn-id: http://core.svn.wordpress.org/trunk@57765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
costdev 2024-06-03 21:25:10 +00:00
parent 8c6a8e0b79
commit 1f87d6b717
2 changed files with 10 additions and 4 deletions

View File

@ -470,7 +470,9 @@ class WP_Automatic_Updater {
* update could contain an error or warning, which could cause
* the scrape to miss a fatal error in the plugin update.
*/
$upgrader->maintenance_mode( true );
if ( 'translation' !== $type ) {
$upgrader->maintenance_mode( true );
}
// Boom, this site's about to get a whole new splash of paint!
$upgrade_result = $upgrader->upgrade(
@ -495,7 +497,9 @@ class WP_Automatic_Updater {
* This avoids errors if the site is visited while fatal errors exist
* or while files are still being moved.
*/
$upgrader->maintenance_mode( true );
if ( 'translation' !== $type ) {
$upgrader->maintenance_mode( true );
}
// If the filesystem is unavailable, false is returned.
if ( false === $upgrade_result ) {
@ -613,7 +617,9 @@ class WP_Automatic_Updater {
}
// All processes are complete. Allow visitors to browse the site again.
$upgrader->maintenance_mode( false );
if ( 'translation' !== $type ) {
$upgrader->maintenance_mode( false );
}
$this->update_results[ $type ][] = (object) array(
'item' => $item,

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.6-alpha-58307';
$wp_version = '6.6-alpha-58308';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.