[wp-trac] [WordPress Trac] #39766: Plugin does not gracefully fail when editing active plugin causes fatal error

WordPress Trac noreply at wordpress.org
Wed Oct 4 21:55:12 UTC 2017


#39766: Plugin does not gracefully fail when editing active plugin causes fatal
error
-------------------------------------+-----------------------------
 Reporter:  ovann86                  |       Owner:  westonruter
     Type:  defect (bug)             |      Status:  closed
 Priority:  high                     |   Milestone:  4.9
Component:  Plugins                  |     Version:  4.7.2
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-patch needs-testing  |     Focuses:  administration
-------------------------------------+-----------------------------

Comment (by jdgrimes):

 Replying to [comment:24 westonruter]:
 > @jdgrimes it is superseded in that it is a better approach to sandboxed
 plugin editing. However, the improvements to `plugin_sandbox_scrape()`
 would still make plugin //activation// more robust as it also uses this
 function. That is why I didn't revert.

 OK. :-)

 I asked in part because I realized that there was another test failure in
 my plugin resulting from this change. This time a function hooked to
 `init`. It isn't a major thing, but I still have my doubts about this
 entire approach.

 I think that if `activate_plugin()` wants to use this approach, it should
 at least run the actions ''after'' the plugin is installed. Meaning that
 it wouldn't be able to use `plugin_sandbox_scrape()`.

 But I'd actually rather see a clean revert of the change to
 `activate_plugin()` completely. After all, increasing the robustness of
 plugin activation in general wasn't the point of this ticket. I think if
 that is needed for some reason, it should be pursued in a separate ticket.
 Ideally, an approach more like that taken in #21622 would end up being
 used. As it is, I think that the current approach is fragile enough to
 make plugin activation less robust instead of more. I may be wrong about
 that though, of course.

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


More information about the wp-trac mailing list