Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 10 years ago

#31327 closed defect (bug) (fixed)

Shiny Updates: Plugins installed on Multisite shouldn't auto-activate on the primary site

Reported by: DrewAPicture Owned by: jeremyfelt
Priority: normal Milestone: 4.2
Component: Plugins Version: 4.2
Severity: normal Keywords: needs-testing has-patch
Cc: Focuses: multisite

Description

In testing the installation part of the new shiny updates functionality in trunk, I discovered that installing a plugin via the Network Admin ended up installing the plugin and auto-activating it on the primary site. Probably shouldn't do that.

Steps to reproduce (multisite required):

  1. Navigation to Network Admin > Plugins > Add New
  2. Install a new plugin by clicking the "Install Now" button
  3. AJAX in the button should indicate the plugin is being installed
  4. Navigate to Primary Site > Plugins
  5. Note that the recently-installed plugin has been installed and is activated

Attachments (1)

31327.patch​ (486 bytes ) - added by ianmjones 12 years ago.
When installing a plugin via AJAX request, do not auto-activate if Multisite.

Download all attachments as: .zip

Change History (5)

@ianmjones
12 years ago

When installing a plugin via AJAX request, do not auto-activate if Multisite.

#1 @ianmjones
12 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

#2 @jeremyfelt
12 years ago

  • Owner set to jeremyfelt
  • Resolution → fixed
  • Status new → closed

In 31511:

Do not activate plugins on initial installation in multisite.

Check is_multisite() before activating a plugin that has been installed via AJAX. Without this check, the plugin would be automatically activated on the main site of the network.

Props ianmjones.

Fixes #31327.

#3 @jeffmcneill
10 years ago

  • Keywords needs-patch added; has-patch removed
  • Severity normal → blocker

I just experienced this behavior with the latest shiny updates 2-20160606 and the latest wordpress multisite. 4.5.2.

  • Go to network plugins
  • Add plugin
  • Install plugin
  • Activate plugin

-- Expected behavior: network activation, and stay on Install Plugin page
-- Actual behavior: ejected to main site of the multisite plugin page, and main site has the plugin activated, network is not activated

#4 @ocean90
10 years ago

  • Keywords has-patch added; needs-patch removed
  • Severity blocker → normal

@jeffmcneill Please report issues with the plugin at ​https://github.com/obenland/shiny-updates/issues.

Note: See TracTickets for help on using tickets.