Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#47189 closed defect (bug) (fixed)

Site Health: Plugins Upgrade Link for Multisite

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

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 6 years ago.
47189-2.diff (1.2 KB) - added by sebastienserre 6 years ago.
47189.2.diff (540 bytes) - added by desrosj 6 years ago.

Download all attachments as: .zip

Change History (23)

#1 @sebastienserre
6 years ago

  • Keywords site-health added

#2 @sebastienserre
6 years ago

  • Component changed from General to Administration
  • Type changed from defect (bug) to enhancement

#3 @jeremyfelt
6 years ago

  • Focuses multisite added
  • Milestone changed from Awaiting Review to 5.3
  • Summary changed from Plugins Upgrade Link for Multisite to Site Health: Plugins Upgrade Link for Multisite
  • Version set to 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
6 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
6 years ago

  • Type changed from enhancement to defect (bug)

#6 @sebastienserre
6 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

@sebastienserre
6 years ago

#7 in reply to: ↑ 4 @jeremyfelt
6 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
6 years ago

  • Milestone changed from 5.3 to 5.2.1

#9 @ocean90
6 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
6 years ago

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

#11 @sebastienserre
6 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
6 years ago

Hello,

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

@desrosj
6 years ago

#13 @desrosj
6 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
6 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
6 years ago

  • Owner set to desrosj
  • Status changed from new to assigned

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

#16 @desrosj
6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 45308:

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

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

#17 @desrosj
6 years ago

  • Keywords fixed-major added; commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for backport consideration.

#18 @desrosj
6 years ago

  • Resolution set to fixed
  • Status changed from reopened to 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.


6 years ago

#20 @spacedmonkey
5 years ago

  • Component changed from Administration to Site Health
Note: See TracTickets for help on using tickets.