Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#44747 closed defect (bug) (wontfix)

Try Gutenberg callout redirects to invalid page on multisite after activation

Reported by: earnjam's profile earnjam Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.8
Component: Administration Keywords: has-patch
Focuses: multisite Cc:


On a multisite network, if you click on the "Activate Gutenberg" button on the Try Gutenberg callout, it uses self_admin_url( 'plugins.php?action=activate&plugin=gutenberg/gutenberg.php&from=try-gutenberg' ) as the URL to activate the plugin.

This network activates Gutenberg, which is probably fine, but it should maybe be more obvious that's what is happening.

However, after activation, we do a redirect using wp_redirect( self_admin_url( "admin.php?page=gutenberg" ) ). Since we just activated in the network context, this results in the URL being: /wp-admin/network/admin.php?page=gutenberg, which does not exist. The user sees a "Sorry, you are not allowed to access this page." error message.

We should use admin_url() here so it redirects to the demo page on the primary site, rather than trying to be in the network admin.

Attachments (1)

44747.diff (565 bytes) - added by earnjam 5 years ago.
Use admin_url() instead of self_admin_url() on the redirect

Download all attachments as: .zip

Change History (4)

5 years ago

Use admin_url() instead of self_admin_url() on the redirect

#1 @swissspidy
5 years ago

  • Component changed from Networks and Sites to Administration
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.9.9

#2 @earnjam
5 years ago

  • Keywords has-patch added; needs-patch removed

#3 @pento
5 years ago

  • Milestone 4.9.9 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Closing, as Try Gutenberg will be removed from the 4.9 branch.

Note: See TracTickets for help on using tickets.