Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter engtech

    (@engtech)

    It’s broken on WordPress.com also.

    Thread Starter engtech

    (@engtech)

    I’m still having huge headaches with base64 characters killing XMLRPC::Lite in perl. I’ve tried out XMLRPC::PurePerl and XML::RPC instead, but both of those packages have even more issues than XMLRPC::Lite.

    I found one hack on the net for XMLRPC::Lite that “kinda” got it to work, but it ended up corrupting a lot of the Base64 characters on my blog into something weird.

    This is really weird especially considering they just added support for this to wordpress.com

    https://wordpress.com/blog/2007/05/23/domain-mapping-and-email/

    Thread Starter engtech

    (@engtech)

    solution is not to pass the dateCreated field.

    base64 characters can cause problems as well, but that is more of an issue with XMLRPC::Lite in Perl.

    Thread Starter engtech

    (@engtech)

    WOW. If you try to take the getRecentPosts response and pass it unmodified into metaWeblog.editPosts it gets REALLY screwed up because of time zones. Which breaks your URLs.

    82c82
    < <link>https://wptheme.wordpress.com/2005/09/11/old-post-2/</link&gt;

    > <link>https://wptheme.wordpress.com/2005/09/10/old-post-2/</link&gt;
    92c92
    < <wp:post_date>2005-09-11 03:46:21</wp:post_date>

    > <wp:post_date>2005-09-10 23:46:21</wp:post_date>
    104c104
    < <link>https://wptheme.wordpress.com/2005/09/11/old-post-3/</link&gt;

    > <link>https://wptheme.wordpress.com/2005/09/10/old-post-3/</link&gt;
    114c114
    < <wp:post_date>2005-09-11 03:46:43</wp:post_date>

    > <wp:post_date>2005-09-10 23:46:43</wp:post_date>

    Thread Starter engtech

    (@engtech)

    If you are using the metaWeblog.editPost method it won’t edit the post unless the description field is set. This prevents a lot of cool tricks like writing scripts to do things like turn off comments on all posts older than 30 days.

    What SHOULD happen is if the description isn’t set by the metaWeblog.editPost arguments then it will just use the existing description. editPost can be used for a lot more than just editing posts — it can be used for tweaking any of the settings on a blog.

    Thread Starter engtech

    (@engtech)

    I’ve tried a couple of different pre-wrapped APIs for using MetaWeblogs or MovableType RPC. It seems broken if all you’re trying to do is flip the comment bit.

    Thread Starter engtech

    (@engtech)

    I’m hitting a bug and it won’t let me use a metaweblogs.editPost call.

    Looking at the xmlrpc.php source code:
    https://trac.www.ads-software.com/browser/trunk/xmlrpc.php

    It’s dying with the oh-so-helpful “Something wrong happened” error.

    1241 $result = wp_update_post($newpost);
    1242 if (!$result) {
    1243 return new IXR_Error(500, __(‘Sorry, your entry could not be edited. Something wrong happened.’));
    1244 }

    Thread Starter engtech

    (@engtech)

    Weird. Whenever I try to use metaWeblog.editPost and just set the mt_allow_comments field I get an error.

    my $call = $self->{ server }->call(
    
            'metaWeblog.editPost',
            $postid,
            $self->{ username },
            $self->{ password },
            {
               mt_allow_comments => 1
            },
            1 # 1 - publish
        );
    
    set_mt_allow_comments: Sorry, your entry could not
     be edited. Something wrong happened.
    at comment.pl line 37
    Thread Starter engtech

    (@engtech)

    There’s some documentation of what all of the non-WP specific API calls do here:

    https://greggman.com/headlines/2003/2003-08-25-xmlrpc-lite.htm

    Thread Starter engtech

    (@engtech)

    One weird thing… I can’t get a list of all post ids via XML-RPC? I would have thought that would be a common command.

    It doesn’t look like there’s much functionality in XML-RPC when it comes to comments. There is the mt_allow_comments field on posts that I should be able to turn on/off via XML-RPC, but there is no way to find out information about the number of comments on posts.

    I think what I’ll do is use the WXR export file as an input, parse it for comment information, and then use XML-RPC to twittle the comments allowed bit automatically.

    This is what I get running mt.supportedMethods

    $VAR1 = [
              'wp.getUsersBlogs',
              'wp.getPage',
              'wp.getPages',
              'wp.newPage',
              'wp.deletePage',
              'wp.editPage',
              'wp.getPageList',
              'wp.getAuthors',
              'wp.getCategories',
              'wp.newCategory',
              'wp.suggestCategories',
              'wp.uploadFile',
              'blogger.getUsersBlogs',
              'blogger.getUserInfo',
              'blogger.getPost',
              'blogger.getRecentPosts',
              'blogger.getTemplate',
              'blogger.setTemplate',
              'blogger.newPost',
              'blogger.editPost',
              'blogger.deletePost',
              'metaWeblog.newPost',
              'metaWeblog.editPost',
              'metaWeblog.getPost',
              'metaWeblog.getRecentPosts',
              'metaWeblog.getCategories',
              'metaWeblog.newMediaObject',
              'metaWeblog.deletePost',
              'metaWeblog.getTemplate',
              'metaWeblog.setTemplate',
              'metaWeblog.getUsersBlogs',
              'mt.getCategoryList',
              'mt.getRecentPostTitles',
              'mt.getPostCategories',
              'mt.setPostCategories',
              'mt.supportedMethods',
              'mt.supportedTextFilters',
              'mt.getTrackbackPings',
              'mt.publishPost',
              'pingback.ping',
              'pingback.extensions.getPingbacks',
              'demo.sayHello',
              'demo.addTwoNumbers',
              'wpStats.get_blog_id',
              'wpStats.update_bloginfo',
              'wpStats.update_postinfo',
              'wpStats.ping_blog',
              'wpStats.flush_posts'
            ];

    and here are some samples of the info I can retrieve about a post

    {
                'permaLink' => 'https://wptheme.wordpress.com/2006/09/11/this-is-a-te st-blog-2/',
                'wp_password' => '',
                'userid' => '190902',
                'mt_allow_pings' => '0',
                'mt_excerpt' => 'POST EXCERPT DISPLAYS INSTEAD OF POST',
                'wp_author_display_name' => 'engtech',
                'dateCreated' => '20060911T00:52:20',
                'link' => 'https://wptheme.wordpress.com/2006/09/11/this-is-a-test-bl og-2/',
                'wp_slug' => 'this-is-a-test-blog-2',
                'mt_allow_comments' => '0',
                'categories' => [
                                'This is a really really really long category name',
                                'Child C',
                                'Category w/ Description'
                              ],
                'description' => 'Hi there, welcome to <a href="https://engtech.wordp ress.com">//engtech</a>\'s little corner of the Internet for testing out themes on WordPress.com before switching them to my blog.
    
    <a href="https://wptheme.wordpress.com/2006/09/11/html-tag-test/">Jump directly t o the HTML test.</a>
    
    Comments are off for this posts, but it does have comments and should display th em.
    
    This post has an excerpt.',
                'postid' => '4',
                'wp_author_id' => '190902',
                'title' => 'Comments off, excerpt test.',
                'mt_text_more' => ''
              },
              {
                'permaLink' => 'https://wptheme.wordpress.com/2005/09/11/old-post-3/' ,
                'wp_password' => '',
                'userid' => '190902',
                'mt_allow_pings' => '0',
                'mt_excerpt' => '',
                'wp_author_display_name' => 'engtech',
                'dateCreated' => '20050911T03:46:43',
                'link' => 'https://wptheme.wordpress.com/2005/09/11/old-post-3/',
                'wp_slug' => 'old-post-3',
                'mt_allow_comments' => '0',
                'categories' => [
                                'Uncategorized'
                              ],
                'description' => 'Creating post archive',
                'postid' => '10',
                'wp_author_id' => '190902',
                'title' => 'Old Post #3',
                'mt_text_more' => ''
              },
    Thread Starter engtech

    (@engtech)

    Just found the latest documentation of MT XML-RPC.

    All existing links to it were broken because Six Apart did a reorg.

    https://www.sixapart.com/developers/xmlrpc/movable_type_api/

    Thread Starter engtech

    (@engtech)

    WordPress 2.2 release notes

    “A new set of WordPress-specific XML-RPC APIs that allow for editing pages, setting categories, and much more.”

    Are these APIs documented anywhere?

Viewing 13 replies - 1 through 13 (of 13 total)