WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 3 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
Milestone: 4.2 Priority: normal
Severity: normal Version: 4.2
Component: Plugins Keywords: needs-testing has-patch
Focuses: multisite Cc:

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 4 years ago.
When installing a plugin via AJAX request, do not auto-activate if Multisite.

Download all attachments as: .zip

Change History (5)

@ianmjones
4 years ago

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

#1 @ianmjones
4 years ago

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

#2 @jeremyfelt
4 years ago

  • Owner set to jeremyfelt
  • Resolution set to fixed
  • Status changed from new to 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
3 years ago

  • Keywords needs-patch added; has-patch removed
  • Severity changed from normal to 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
3 years ago

  • Keywords has-patch added; needs-patch removed
  • Severity changed from blocker to normal

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

Note: See TracTickets for help on using tickets.