[wp-trac] [WordPress Trac] #37531: Plugin installation failure not reflected in the UI
WordPress Trac
noreply at wordpress.org
Thu Aug 4 22:17:46 UTC 2016
#37531: Plugin installation failure not reflected in the UI
-------------------------------------------+-------------------------------
Reporter: AronMS | Owner: ocean90
Type: defect (bug) | Status: closed
Priority: high | Milestone: 4.6
Component: Plugins | Version: trunk
Severity: major | Resolution: fixed
Keywords: has-patch commit dev-reviewed | Focuses: ui,
| administration
-------------------------------------------+-------------------------------
Changes (by ocean90):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"38199"]:
{{{
#!CommitTicketReference repository="" revision="38199"
Upgrade/Install: Make some install/update failures more verbose.
An upgrader class is used in conjunction with an upgrader skin class. A
skin class handles the logging for an upgrade and informs a user about the
progress and failures.
The current Ajax install/update handlers are using the
`Automatic_Upgrader_Skin` class because during an Ajax request no output
is intended. The difference between Ajax updates and automatic updates is
that you will see the full log (usually by email) while Ajax updates focus
only on success or failure. For that `Automatic_Upgrader_Skin` has one
disadvantage: It doesn't provide a way to retrieve failure messages which
were passed through `WP_Upgrader_Skin::error()` by the upgrader.
To solve this issue a new skin `WP_Ajax_Upgrader_Skin` has been
introduced. The skin extends `Automatic_Upgrader_Skin` and overrides the
`error()` and `feedback()` methods to intercept all errors, which can be a
`WP_Error` object or a string.
This updates all four Ajax handler for installing/updating themes/plugins
to use the new skin. They now also check the skin for any intercepted
errors and pass them on to the user.
Props flixos90, obenland, ocean90.
Props DrewAPicture, pento for review.
Fixes #37531.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37531#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list