Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#7292 closed defect (bug) (invalid)

XMLRPC not working with plugins

Reported by: Lokarabia Owned by: Lokarabia
Priority: normal Milestone:
Component: XML-RPC Version:
Severity: major Keywords: xmlrpc
Cc: redsweater

Description

Test-Case:
Trying to post via a program and the xmlrpc interface results in no output.

Reason:
Seems one of the plugins installed crashes the way xmlrpc.php works. Because you can track to settings.php and there until:

if ( get_option('active_plugins') ) {
$current_plugins = get_option('active_plugins');
if ( is_array($current_plugins) ) {
	foreach ($current_plugins as $plugin) {
		if ('' != $plugin && file_exists(ABSPATH . PLUGINDIR . '/' . $plugin))
					include_once(ABSPATH . PLUGINDIR . '/' . $plugin);
		}
	}
}

FIX:
Put into xmlrpc.php before include('./wp-config.php');: $no_plugins = 1;
Replace the function from settings.php with:

if(!$no_plugins){
  if ( get_option('active_plugins') ) {
	$current_plugins = get_option('active_plugins');
	if ( is_array($current_plugins) ) {
		foreach ($current_plugins as $plugin) {
			if ('' != $plugin && file_exists(ABSPATH . PLUGINDIR . '/' . $plugin))
				include_once(ABSPATH . PLUGINDIR . '/' . $plugin);
		}
	}
  }
}

Guess that should do the trick, because xmlrpc doesn't need any plugins and so it could be prevented that other plugins causing this issue, too.

Cheers,
Thomas

Change History (7)

  • Owner changed from anonymous to Lokarabia
  • Keywords xmlrpc added

comment:3   DD325 years ago

Then the plugin at fault needs to be fixed.

Plugins can be used to provide extra XML-RPC methods and/or modify the way the API's work, If a plugin is interfering with the standard API, Then the plugin needs to be modified to suit.

Disable them one-by-one until you locate the problem plugin and notify the plugin author, See what they've got to say.

  • Cc redsweater added

Glad to see DD32 already chimed in here. Certainly XMLRPC can benefit from plugins!

Lokarabia, hope you can track down the offending plugin and get the author to fix it up. In general plugins work great with XMLRPC.

Daniel

  • Resolution set to invalid
  • Status changed from new to closed

Absolutely agree with DD32. I'm closing this as invalid.

  • Milestone 2.7 deleted
  • Version 2.5.1 deleted
Note: See TracTickets for help on using tickets.