[wp-trac] [WordPress Trac] #44747: Try Gutenberg callout redirects to invalid page on multisite after activation

WordPress Trac noreply at wordpress.org
Tue Aug 7 10:04:39 UTC 2018


#44747: Try Gutenberg callout redirects to invalid page on multisite after
activation
--------------------------------+-----------------------------
 Reporter:  earnjam             |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Networks and Sites  |    Version:  4.9.8
 Severity:  normal              |   Keywords:
  Focuses:  multisite           |
--------------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44747>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list