[wp-trac] [WordPress Trac] #7292: XMLRPC not working with plugins
WordPress Trac
wp-trac at lists.automattic.com
Mon Jul 14 08:12:35 GMT 2008
#7292: XMLRPC not working with plugins
-----------------------+----------------------------------------------------
Reporter: Lokarabia | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.7
Component: XML-RPC | Version: 2.5.1
Severity: major | Keywords:
-----------------------+----------------------------------------------------
'''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
--
Ticket URL: <http://trac.wordpress.org/ticket/7292>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list