The wp_getuserblogs error of WordPress Mu 1.5.1 cannot be used in Windows Live writer.

Source: Internet
Author: User

From http://lichao.net/weblog/web-development/blogging/111.html#comment-11956

I have been using Microsoft Windows Live writer to update my blog. It feels good. However, just a few days ago, after I upgraded all my blogs WordPress Mu multi-user version 1.3.3 to 1.5.1, wlw was not able to work with Mu. This is the case. After you write the article in wlw and press "publish", a WP is displayed. the getusersblogs call does not exist. It is either a user name error or a wrong password. I thought that the upgrade may disrupt my username and password, so I quickly logged on to the background and updated all the usernames and passwords. The same error message is returned when a new article is published in wlw. To test whether it was just an error, I tried to open an article on my blog in wlw and saw the status change for a while. Finally, it was also an error that does not exist in WP. getusersblogs. It seems that wlw is incompatible with WordPress Mu 1.5.1.

The full text of the error message is shown below:

Log Server Error-32601 occurred server error. Requested method WP. getusersblogs does not exist. You must correct this error before proceeding.

Of course, I am unwilling to give up wlw because of an upgrade. I am eager to go to the official support website of WP mu to find countermeasures. It turns out that this is a bug in the new version of Mu (see the error report http://trac.mu.wordpress.org/ticket/631 submitted by someone ). The cause of this error is the XMLRPC. php file.

To solve this problem, we need to change it in two ways. First, use your text editor to open the XMLRPC. php file.

First,Find row 94th, as shown below:

Line 94 'blogger. getusersblogs' => 'this: blogger_getusersblogs ',

Add the following line of code in front of it:

'Wp. getusersblogs' => 'this: wp_getusersblogs ',

Second:Go to the second line of the file, start to copy the code to the second line, and then return to the second line of code "* WordPress XML-RPC API", paste the entire copied code. A slight modification to the code is equivalent to inserting a new function namedWp_getuserblogsThe modified code is as follows:

* Wp_getusersblogs
*/
Function wp_getusersblogs ($ ARGs ){
$ This-> escape ($ ARGs );
$ Username = $ ARGs [0];
$ Password = $ ARGs [1];
If (! $ This-> login_pass_ OK ($ username, $ password ))
Return $ this-> error;
Do_action ('xmlrpc _ call', 'wp. getusersblogs ');
$ User = set_current_user (0, $ username );
$ Blogs = (array) get_blogs_of_user ($ user-> ID );
$ Struct = array ();
Foreach ($ blogs as $ blog ){
// Don't include blogs that aren't hosted at wordpress.com
If ($ blog-> site_id! = 1)
Continue;
$ Blog_id = $ blog-> userblog_id;
Switch_to_blog ($ blog_id );
$ Is_admin = current_user_can ('level _ 8 ′);
$ Struct [] = array (
'Isadmin' => $ is_admin,
'Url' => get_option ('home ').'/',
'Blogid' => $ blog_id,
'Blogname' => get_option ('blogname '),
'Xmlrpc '=> get_option ('home').'/XMLRPC. php'
);
}
Return $ struct;
}

Last,Save your changes and upload the file to your server through FTP to overwrite the original XMLRPC. php file! You can use your beloved wlw to update your Mu blog!

Of course, if you do not want to directly change the XMLRPC. php file, you can download the modified XMLRPC. php file here. In addition, I can find the original English document on this issue here.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.