Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#47189 closed defect (bug) (fixed)

Site Health: Plugins Upgrade Link for Multisite

Reported by: sebastienserre Owned by: desrosj
Priority: normal Milestone: 5.2.1
Component: Site Health Version: 5.2
Severity: normal Keywords: site-health has-patch fixed-major
Cc: Focuses: multisite

Description

Hello,

On a multisite, Site Health says "Manage your plugins" & "Update your plugins" with link to /wp-admin/plugins.php but in Multisite the linbk should be /wp-admin/network/plugins.php where the upgrade is possible.

Attachments (3)

47189.diff​ (1.3 KB ) - added by sebastienserre 8 years ago.
47189-2.diff​ (1.2 KB ) - added by sebastienserre 8 years ago.
47189.2.diff​ (540 bytes ) - added by desrosj 8 years ago.

Download all attachments as: .zip

Change History (23)

#1 @sebastienserre
8 years ago

  • Keywords site-health added

#2 @sebastienserre
8 years ago

  • Component General → Administration
  • Type defect (bug) → enhancement

#3 @jeremyfelt
8 years ago

  • Focuses multisite added
  • Milestone Awaiting Review → 5.3
  • Summary Plugins Upgrade Link for Multisite → Site Health: Plugins Upgrade Link for Multisite
  • Version → 5.2

Good call, @sebastienserre. I think it makes sense to adjust the URL to better fit the context of that action.

#4 follow-up: @audrasjb
8 years ago

@jeremyfelt since this feature was introduced in 5.2, I would say it can fit to the next minor, isn't it? (cc @clorith)

#5 @audrasjb
8 years ago

  • Type enhancement → defect (bug)

#6 @sebastienserre
8 years ago

I'm on a patch and I think the update link should be network/update-core.php and manage plugin to network/plugins.php

#7 in reply to: ↑ 4 @jeremyfelt
8 years ago

Replying to audrasjb:

since this feature was introduced in 5.2, I would say it can fit to the next minor, isn't it?

Very possible! I just avoided making that call myself. :)

@sebastienserre 47189.diff​ is on the right track. There is a network_admin_url() function that is available to both single and multisite that should work for this purpose. It has its own is_multisite() check that will return admin_url() when appropriate.

#8 @Clorith
8 years ago

  • Milestone 5.3 → 5.2.1

#9 @ocean90
8 years ago

Note that there's a menu_items site option in multisite which can allow site admins to access plugins at /wp-admin/plugins.php.

#10 @sebastienserre
8 years ago

  • Keywords has-patch dev-feedback added; needs-patch removed

#11 @sebastienserre
8 years ago

I think, y working on this ticket, there's a problem with my patch because a "simpe" administrator will see it and click... but won't be authorized to go on the network level... very frustrating :-(.

This surely have something to do with a current_user_can().

#12 @sebastienserre
8 years ago

Hello,

Sorry, it's OK as Site Health on MS is only accessible to Super-Admin

#13 @desrosj
8 years ago

47189.2.diff​ changes only the "Update your plugins" link. Managing plugins can be done within the site context.

I hesitated adding network_admin_url to the "Manage inactive plugins" link. A site administrator that clicks this form a site on a network could incorrectly assume they can just delete plugins that are inactive on that site. But, they could actually be active on other sites.

#14 @Clorith
8 years ago

  • Keywords commit added; dev-feedback removed

I think 47189.2.diff​ is fine.

With regards to the "Manage inactive plugins", this section is unavailable in a multisite setting, so we don't need the network admin URL in that context.

#15 @desrosj
8 years ago

  • Owner set to desrosj
  • Status new → assigned

Ah, you're right, @Clorith! This looks good.

#16 @desrosj
8 years ago

  • Resolution → fixed
  • Status assigned → closed

In 45308:

Site Health: Link to the correct plugin update screen in multisite installs.

Props Clorith, sebastienserre, jeremyfelt, desrosj.
Fixes #47189.

#17 @desrosj
8 years ago

  • Keywords fixed-major added; commit removed
  • Resolution fixed
  • Status closed → reopened

Reopening for backport consideration.

#18 @desrosj
8 years ago

  • Resolution → fixed
  • Status reopened → closed

In 45313:

Site Health: Link to the correct plugin update screen in multisite installs.

Merges [45308] to the 5.2 branch.

Props Clorith, sebastienserre, jeremyfelt, desrosj.
Fixes #47189.

This ticket was mentioned in ​Slack in #meta by gibrown. ​View the logs.


7 years ago

#20 @spacedmonkey
7 years ago

  • Component Administration → Site Health
Note: See TracTickets for help on using tickets.