#49400 closed enhancement (fixed)
Enable maintenance mode when a plugin auto-updates
Reported by: | desrosj | Owned by: | desrosj |
---|---|---|---|
Milestone: | 5.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Upgrade/Install | Keywords: | has-patch |
Focuses: | docs | Cc: |
Description
Currently, when an active plugin is auto-updating, it remains active and the site does not enter maintenance mode.
This can cause a few issues:
- If a user loads the Plugins screen in the admin, the plugin could deactivate if an error is encountered mid upgrade.
- If a user loads the front end of the website and an error is encountered, the WSOD protection will be triggered sending a "false alarm" email to the site admin.
This is a spin-off of #48850 to tackle this in a smaller chunk.
Also potentially related: #34676.
Attachments (3)
Change History (24)
#3
@
5 years ago
The documentation fixes in 49400.1.patch look good at a glance, but I'd like to make sure they're consistent with class-theme-upgrader.php
.
Let's get 49400.diff in for now, and improve the docs after Beta 1.
#4
@
5 years ago
- Owner set to desrosj
- Resolution set to fixed
- Status changed from new to closed
In 47275:
#5
@
5 years ago
- Focuses docs added
- Keywords needs-testing removed
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening to improve the inline documentation during beta.
#6
@
5 years ago
Inline docs checked, slightly reformatted, and applied to the functions in class-theme-upgrader.php as well.
Side question, is there a reason the filters in class-plugin-upgrader.php's bulk_update() are different than update(), but in class-theme-upgrader.php they are the same?
This ticket was mentioned in Slack in #core by bookdude13. View the logs.
5 years ago
This ticket was mentioned in Slack in #core by david.baumwald. View the logs.
5 years ago
#11
@
5 years ago
Personally, I don’t feel this needs to be reverted. This is a self-contained enhancement to plugin auto-updates. While this feature has not been exposed through a UI in 5.4, site owners can still enable this with a filter.
On my personal sites, I have been seeing this work without issue since the day it was committed. I receive debug emails, and maintenance mode is correctly toggled before and after update.
If there is consensus to make all auto-update improvements in the same release, I’m fine with reverting. But this one is not coupled to the UI aspects, and will only prevent the two scenarios in the ticket description.
#13
@
5 years ago
How does this effect premium plugins or plugins not on dot org that contain their own updating code?
Deactivating them in the middle of an update could be very problematic.
#14
@
5 years ago
- Keywords revert removed
This doesn't deactivate anything, it puts the site into maintenance mode (via wp_maintenance()
).
@desrosj In that case I'm happy to leave the code in place. The revert was more to remove non-functional code, but if this can be utilised by plugins then I'm happy for it to stay in.
I'll review the docs changes and get those in.
#17
in reply to:
↑ 15
@
5 years ago
@dkarfa should get props too, I mostly reformatted what he had already put in for docs.
Replying to johnbillion:
Props bookdude13
See #49400
}}}
49400.diff uses the same approach that is used in the
Theme_Upgrader
class, hooking into the pre-install/post-install filters.