[wp-trac] [WordPress Trac] #50822: Site Health page incorrectly reports plugin auto-update status

WordPress Trac noreply at wordpress.org
Sat Aug 1 20:52:35 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 has-patch  |     Focuses:
---------------------------------------+---------------------
Changes (by pbiron):

 * keywords:  has-screenshots => has-screenshots has-patch


Comment:

 Currently, the auto-update related Site Health strings are based on
 consulting the results of `get_plugin_updates()` and
 `get_theme_updates()`, instead of consulting the site transients directly.

 The original patch ([attachment:"50822.diff"]) followed that same
 strategy, using `response` if present and creating a mock item if not, to
 pass to `auto_update_plugin` and/or `auto_update_theme`.  That turned out
 to be too unreliable.

 So [attachment:"50822.2.diff"] now checks `response` and `no_update` from
 the transients, and only creates a mock item if neither of those is
 set...which is what the list table does.

 Note that [attachment:"50822.2.diff"] continues to use the returned value
 of `get_plugin_updates()` and `get_theme_updates()` for everything
 **other** can constructing the item to be passed to the
 `auto_update_plugin` and `auto_update_theme` filters.  Ultimately, I think
 those other uses should be rewritten to use the transients directly, but
 I'm reluctant to do that at the last minute for fear of introducing yet
 another last minute bug.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50822#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list