Wrong redirect on Multisite
-
On WordPress multisite, on the first plugin activation, after the Freemius welcome screen, the user gets redirected to the wrong page:
/wp-admin/admin.php?page=tptn_network_pop_posts_pageThe url is missing the “network” part. The correct url is:
/wp-admin/network/admin.php?page=tptn_network_pop_posts_pageBut this can also be problematic because on Multisite, administrators do not have access to the network settings. Only Super Admins can access that page. If a regular admin activates the plugin on their subsite, they will get redirected to a page they cannot access.
The best way to handle this is to simply redirect them to the subsite’s settings page. You can remove the exception for Multisite from your code. Here is the change we made:
- 'slug' => is_multisite() ? 'tptn_network_pop_posts_page' : 'tptn_dashboard',
+ 'slug' => 'tptn_dashboard',If you want to test this, create a wordpress multisite, sing in as a regular admin and activate the plugin on one of the subsites for the first time.
The topic ‘Wrong redirect on Multisite’ is closed to new replies.