Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#52669 closed enhancement (fixed)

Amend plugin link for Link Manager error.

Reported by: tw2113's profile tw2113 Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.8 Priority: normal
Severity: trivial Version:
Component: General Keywords: has-patch
Focuses: Cc:


Right now, if a user tries to visit the legacy link management pages, they are instructed to install the "Link Manager" plugin which re-enables the pages.

However, the link provided to install the plugin just points to a search by keyword for "Link Manager", which at present time returns 2,153 results to sift through to hopefully find the intended

Let's help the user out by providing direct links to install the plugin, if able to, and then if they re-visit the same page without having activated yet, provide a link to activate it too.

Attached is a patch that checks the current status of "Link Manager" plugin, and amends the messaging link URLs to either install or activate the plugin.

Attachments (3)

52669.diff (1.8 KB) - added by tw2113 3 years ago.
52669.2.diff (1.8 KB) - added by tw2113 3 years ago.
52669.3.diff (1.9 KB) - added by tw2113 3 years ago.

Download all attachments as: .zip

Change History (12)

3 years ago

#1 @SergeyBiryukov
3 years ago

  • Milestone changed from Awaiting Review to 5.8

#2 @peterwilsoncc
3 years ago

Thanks for the patch, a couple of minor notes:

  • short array syntax in the plugins_api(), Core uses the long array syntax
  • If the plugin is installed, I don't think there needs to be a check for the latest version before activating: site admins can handle that as part of their regular update routine
  • I may be wrong about the above ;) -- if that's the case and the plugin needs updating a "please update" if condition will be needed. As is, an out of date plugin shows the message 'Sorry, you are not allowed to edit the links for this site.'

This is so much nicer than the current search link. Thanks boss.

#3 @tw2113
3 years ago

Will fix up the array syntax soon.

I will also look things over and see how to only do some parts if the plugin is installed already.

3 years ago

#4 @tw2113
3 years ago

Removed the latest version check because in brief hindsight, it was needless. We just need to activate once we get to that point.

Short array syntax removed.

#5 @SergeyBiryukov
3 years ago

Thanks for the patch!

Just noting that we'd probably want for the approach here to be consistent with the checks for Classic Editor plugin in do_block_editor_incompatible_meta_box().

#6 @tw2113
3 years ago

Thanks @SergeyBiryukov

I will check that section out and further amend to fit. Stay tuned.

3 years ago

#7 @tw2113
3 years ago

Amended to better match how Classic Editor does its own checks, as opposed to pinging for a status check.

#8 @SergeyBiryukov
3 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#9 @SergeyBiryukov
3 years ago

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

In 51011:

Administration: Improve the message about installing the Link Manager plugin to use legacy Links screen.

This provides direct links to install and activate the plugin, if the user has the capabilities to do so, instead of just linking to plugin search results.

It also matches more closely the message about installing the Classic Editor plugin for meta boxes incompatible with the block editor.

Follow-up to [22855], [44280], [45657].

Props tw2113, peterwilsoncc, SergeyBiryukov.
Fixes #52669.

Note: See TracTickets for help on using tickets.