WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#2928 closed defect (bug) (duplicate)

broken plugins are still active after activation errors

Reported by: ryanscheuermann Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.1
Component: Administration Keywords: plugins
Focuses: Cc:

Description

In plugins.php, the activate hook is called after you update the plugin as an "active" plugin, but if the activate method throws an error, the plugin is still "active". To correct the error, you have to deactivate it, fix/upgrade the plugin, and then reactivate. A broken plugin shouldn't remain active.

Suggested solution: call the activate hook before updating the active plugins, and if there is an error, the plugin can die with an error message before it's officially activated.

Change History (5)

comment:1 @ryanscheuermann9 years ago

  • Milestone set to 2.1
  • Version set to 2.1

comment:2 @darkfate9 years ago

As in #2927, most plugins don't know if it's the latest version. It should deactivate so it doesn't think its active, but then tell the user that the plugin has an error.

comment:3 @matt9 years ago

  • Milestone changed from 2.1 to 2.2

comment:4 @johnbillion8 years ago

#3254 fixes this in 2.2.

comment:5 @foolswisdom8 years ago

  • Milestone 2.2 deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.