Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#40377 closed defect (bug) (duplicate)

Wrong redirect after save plugin settings in network admin level only

Reported by: serpentsoft's profile Serpentsoft Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Networks and Sites Keywords:
Focuses: multisite Cc:


add_action( 'admin_menu', array( &$this, '_settings_menu' ) );
add_action( 'network_admin_menu', array( &$this, '_settings_menu' ) );

I’m using [admin_menu] and [network_admin_menuu] actions to create some option pages for my plugin and the saving operations working great in both WordPress Single & Multisite blogs.

BUT, In the network admin level [ /wp-admin/network/admin.php?page=plugin_settings ] NOT [ /blog-1/wp-admin/admin.php?page=plugin_settings ]

After saving the page redirect to [ /wp-admin/network/options.php ] and the following error appears and of course won’t save the test values.

Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error. If you think this is a server error, please contact the webmaster.

Note: The plugin is Activated under Network

Change History (3)

#1 @Serpentsoft
6 years ago

New Data #1

I'm testing on 2 sites [terminal-1] and [terminal-2], Of course beside the main blog, The three blogs saving the settings correctly.

The settings in network level [ MY_SITE/wp-admin/network/admin.php?page=plugin_settings ] retrieve the data from the main site [ MY_SITE/wp-admin/admin.php?page=plugin_settings ] correctly (I don't know whether that correct or not) and if that is correct why the main site don't act like a network level?.

Of course I cannot use the main site instead of network level 'cause there're some settings must set by the network admin under the network level aswell and not even appear.

Last edited 6 years ago by Serpentsoft (previous) (diff)

This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.

6 years ago

#3 @flixos90
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version 4.7.3 deleted

Hey @Serpentsoft, thanks for opening the ticket and welcome to Trac!

Unfortunately what you describe happens because the settings API currently does not support settings pages in the Network Admin. At the moment, plugins are required to handle their network settings pages with fully custom code.

A proper network settings API will fix the issue you're talking about, therefore I'm closing this ticket in favor of #15691, which has the goal to introduce such a network settings API. I'm personally very interested in it too, but the ticket has not received a lot of attention recently. Please have a look if you're interested, maybe we can revive discussion there.

Note: See TracTickets for help on using tickets.