[wp-trac] [WordPress Trac] #50822: Site Health page incorrectly reports plugin auto-update status
WordPress Trac
noreply at wordpress.org
Fri Jul 31 19:40:52 UTC 2020
#50822: Site Health page incorrectly reports plugin auto-update status
-----------------------------+---------------------
Reporter: Gwendydd | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.5
Component: Site Health | Version: trunk
Severity: normal | Resolution:
Keywords: has-screenshots | Focuses:
-----------------------------+---------------------
Comment (by pbiron):
[attachment:"50822.diff"] addresses most of this problem and what is a
bare minimum for a 5.5 fix.
It does **not guarantee** that the text in the Automatic Updates column in
the list table and that in the Site Health debug screen will agree 100% of
time, but it does ensure that those plugins/themes that appear in the
`Auto-updates enabled/disabled` views on the list table will display
`Auto-updates enabled/disabled` appropriately on the Site Health debug
screen.
Here's why the patch doesn't guarantee the strings on the 2 screens are
the same:
1. if a plugin/theme does not hook into the Updates API then the list
tables display an empty string, e.g., Gravity Forms ActiveCampaign Add-On
in [attachment:"Image 2020-07-30 at 2.41.00 PM.png"]). The rationale for
the patch displaying `Auto-updates disabled` on the debug screen for such
plugins/themes is same as given in
[https://core.trac.wordpress.org/ticket/50808#comment:9 50808 comment:9].
We can reconsider that in a future version if necessary.
2. plugins can hook into `plugin_auto_update_setting_html` to display a
completely custom message on the list table, and it's unclear whether such
custom messages would be appropriate for the debug screen. For example,
@Gwendydd has
[https://wordpress.slack.com/archives/CULBN711P/p1596146408368900?thread_ts=1596145198.358700&cid=CULBN711P
mentioned that GF] might hook into `plugin_auto_update_setting_html` to
display a link to the GF settings screen. That is one of the main use
cases for why `plugin_auto_update_setting_html` was added and is very
appropriate for the list table, but likely would not be appropriate for
the debug screen. Therefore, the patch here does **not** apply that
filter when constructing the strings for the debug screen. Again, that
can be reconsidered in a future version when we have some experience with
how plugins in the wild actually use that filter.
As there is a lot of repetition in the site health code, please review
[attachment:"50822.diff"] **very** carefully to make sure I didn't
inadvertently forget to correct variable names/etc when I copy-pasted code
used for `active plugins` into that used for `active theme`, etc.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50822#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list