XMLRPC-Talk

Summary: Talk page for XMLRPC.
Maintainer: James McDuffie, XES
Users: (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Help Test XMLRPC - Instructions

Every blogging software package is different. Here's some general guidelines, please note what actually works in the software you test in the chart below.

  • Important: If there's a network log or console in the application which logs the xml transactions, please try to send them to Crisses at her kinhost.org email address.
  • The custom "blog XMLRPC API url" for the test blog is http://xmlrpc.eclectictech.net/pmwiki/pmwiki.php?action=xmlrpc
  • Whenever possible select the MetaWebBlog API -- if not listed, other blogging platforms may use MetaWebLog API (i.e. try selecting WordPress or other blog platforms which allow a custom API url).
  • Use your own username (it's arbitrary, but will show up in Recent Changes & page history), and the password "pmwikiuser" (no quotes).
  • Some software pulls in all available "BlogId"s (PmWiki Groups) for your username and password. When you need to enter the "BlogId" or "Blog name" try "Blog" or "Main". On the test site, "Blog" has been populated with past blog posts.
  • Try 2 ways to "title" your posts (some software works the first way, some requires the second way):
    • Simple post title: "This Is My New Page"
    • Explicit post title with group name: "Blog.This Is My Other New Page"
  • Use HTML Mode or "Source Code" mode, but write wiki code just as if you were editing pages on your website i.e. use wiki markup, not HTML
  • Check the option/preferences/settings for the client application: disable changing linebreaks to HTML & disable processing Markdown if it's an option
  • Check on changes you post at http://xmlrpc.eclectictech.net/pmwiki/pmwiki.php/Blog/Blog or http://xmlrpc.eclectictech.net/pmwiki/pmwiki.php/Site/AllRecentChanges
  • Add your experiences to the chart below.

Feel free to alter posts or create new posts in the Blog group. It's a scrap wiki, you can post anywhere, but it will be easier to find if it's in the Blog group, and you'll be able to tell whether the software works as expected.

KEY: P=Page creation works, U=Updating pages works, D=Deleting pages works, C=Adding categories to pages works, S=Simple title->page names work, X=Requires explicit group.title->page names, DFR=Detect flags required.
green=works well, blue=has a minor hiccup, gold=has issues that may block use, orange=warning: has an issue seriously impeding use, red=has a bug which makes it impossible to use. Reasons for the rating are in color.
SoftwareOSVersionSetting TipsProgress Notes
MarsEditMac3.6.3 PUDCS
ScribeFireFirefoxClassicUse MetaWeblog API & fill in the "Blog Id:" field when adding the wiki information.PUDCS Use <A> tab (Source mode) and & select the proper group under "Blogs" tab on right. Tested on old PPC Mac laptop running OS X 10.5.8, Firefox 3.6.25. ScribeFire Next will not run on this hardware.
ScribeFireSafari 5.1.10 on OS X 10.6.84.2.3DFRPUCS Submitted feature request to disable all HTML tagging. Lists ALL accessible BlogIds. Use drop-down blog menu on the main post-creating screen. Disable Markdown & any html tags you can (if available) under ScribeFire Options.
ScribeFireFireFoxNext (4.2.3)Connects, but doesn't point to the group you request. DFREven when you get it to ask for the BlogId it reverts to the first "Blog" returned by the server. To post to another group, use a complex page title with the group name i.e. "Blog.Testing ScribeFire". Submitted feature request to disable all HTML tagging.
ScribeFireChrome4.3.1Connects, but doesn't point to the group you request. DFRPUCS Even though you ask for a specific BlogId it reverts to the first "Blog" returned by the server. To post to another group, use a complex page title with the group name i.e. "Blog.Testing ScribeFire". You cannot pull in text from existing pages unless it's in the group selected. Use Options to disable all HTML tagging. Can only add that 1 automatic BlogId -- trying again won't make additional entries. Must exit & come back in to ScribeFire for the "BlogId" choice to become available for MetaWeblog choice when adding new wiki groups.
MacJournalMac6.0.10Journal->Blog Settings->Type:MetaWebLog; must choose group to post to in BlogId. In "Options" tab select "Formatting: None". Use wiki $FullName (Group.Page Name Spaced Is Ok) as "Topic" for posts.PU May not retrieve all past posts. Could be a corrupted test page, content it dies on, or another bug. Categories on new posts not working. Will use $Name.$Name instead of $Group.$Name from the title of post, so must add "$Group" explicitly to Title of post.
BlogsyiOS4.2.9Un-intuitive set up: use setting gear in lower right corner. Settings Gear->Service Settings->MetaWebLog->Add a New MetaWeblog Account... "Blog Name" is arbitrary, "Blog ID" is the group name.PS Above the setting gear is a button to swap between HTML code & rich text editing (you want "HTML Mode", it auto-fills in <p> tags, and you need to just delete them.). Loses line breaks when reading existing pages back in from the server. List of entries under circle in upper right->Select Blog, but they have mentioned line break problems.
BlogiloLinux1.1 Newlines stripped when existing posts pulled from server. Removes \n newlines when posting, otherwise posting works. Has HTML edit mode tab. Trying to edit an existing post causes an error "Parsing error: Could not read the result, not a boolean."
DrivelLinux3.0.5 MetaWebLog seems unsupported. Only choice where login works is Blogger 1.0. No HTML edit mode. :-( New post attempt simply reports "Done" from Drivel but posting does not work. Try the xmlrpc-0.2.zipΔ package. It may "just work" with Blogger 1.0 mode.
BlogPressiOS3.2.1 Failed to pull up existing pages, but was able to post to the blog. Uses HTML <br> characters though! No way to edit in HTML mode that I can see. This package won't work for PmWiki right now.
QumanaMac3.2.4Click "Add Blog", enter API url then next->select "Metaweblog API" & same API url then next->username & password then next-> select "Blog" (i.e. PmWiki Group), then finish.BUG: Publishing a page hangs during the send process. The XML traffic never makes it to the network. Does not work. Pulls in existing posts. Use "Source View" for wiki markup. Doesn't render source wiki markup's linebreaks in html edit mode on existing posts.
EctoMac3.0.2 BUG: Ecto messes up \n newlines in editor windows. Bug report filed. &#10; encoded newlines are passed to Ecto, Ecto changes them to #10 and are displayed in the post instead of an actual newline being produced. Posting works fine. Can't edit existing pages unless you want to fix all the broken linebreaks. Presumably I can get Ecto to work if I can alter the linebreak encoding? Been trying, but haven't found a graceful way to do it. I can just send newlines, they do NOT need encoding.
BlogoMac1.3 Got it to retrieve posts, looked promising but has a fatal bug: keeps insisting it's offline and disables the "Post" button although clearly it was able to pull down all the previous posts so it's not offline. Will try again on my desktop rather than laptop, but be cautious if you see this behavior; you may not be able to post at all. It clearly states that it cannot find the Twitter search trends and that you are offline and unable to post upon launch.

State of the Package XES February 19, 2014, at 04:26 PM

Thank you to testers, good to know just how broken this package currently is :)

The xmlrpc-0.2.zipΔ package is out-of-date (Linux users with access to Drivel should try the old package -- it may "just work" out of the box). Blogger (by Google) no longer uses XMLRPC, and MetaWeblog is more of a standard than the old Blogger (1.0) API (it includes some of the same calls and functionality, but there are some significant changes to content handling of pages/posts most specifically, and no API key in the MetaWebLog XML makes the 2 standards completely incompatible). I have eliminated both blogger.php and voodoopad.php included in the old package, and am working to support the MetaWeblog API in the hopes that it will return full functionality to the package. Some services have moved on to SOAP, but that is out of the scope of this package.

The new package will have all PmWiki API support in the xmlrpc.php file and the phpxmlrpc package includes (*.inc files) in the xmlrpc/ folder (which can probably be periodically updated to the upstream files without affecting functionality as bugs are fixed or security holes patched). As mentioned above, Blogger API has fallen out of favor in the blogosphere, and hopefully VoodooPad supports MetaWebLog and thus this should "just work" anyway -- so both the blogger.php and voodoopad.php have been eliminated from the package (I may add Blogger functionality back in to support Blogger 1.0 API in the basic package in the future). This package is not for RSS feeds, so I decided not to use the Atom protocol (and reserve the right to change my mind).

Content delivered is full markup, thus you should require at least edit permissions to view page contents.

Progress

  • simple PmWiki password works ("Page Title" becomes "Group.PageTitle") in client software unless otherwise noted.
  • handles "list of blogs" (i.e. PmWiki Groups)
  • lists pages in the selected blog/group (, working on meeting page data specs...then will fix the data itself.)
  • hands real page URL to client (for "view in browser")
  • hands real page title to client (as defined by (:title xxx:) OR the unadulterated Group.Name of the page)
  • pulls in Category list as defined by $CategoryGroup (per PmWiki standards) $Name's
  • now allows tagging of new and updated pages - TO DO: recognize & check-off existing tags already on a page
  • now deletes pages
  • now records the author's Profile link on Recent Changes
  • now attempting to sniff network traffic via Wireshark on my mac to debug app
  • Detect newlines: added feature to detect \n when content is sent back from the client software package: if undetected will attempt to change <br> and <p> tags into newlines. This helps ScribeFire work as expected, and may help other client packages.
  • Now has SDV filters to modify Groups included in "BlogId" (i.e. you can now eliminate PmWiki, Site, SiteAdmin, Data, Category...), can add desirable blog groups to list even if they don't exist yet (i.e. Profiles or Events or other potential PmWiki groups you desire) and can ignore all of the above by supplying a static list of groups i.e. if you only want "Blog,Main" groups, you can just override with a static list and save some processing power.

Known Issues:

Package-specific

  • Posts pulled off the server lose their association to categories. Your blog software may or may not remember the association, but the information should be retrieved from the server.
  • There is currently no difference between tags and categories... not sure if there should be, per PmWiki's standards. You can go nuts and use Categories like tags, or you can go simple and just assign a few broad categories to your posts...they'll all end up in the Category group by default or whatever group you set as your category group in your config.php.
  • Need to eliminate category divs when there are no post tags/categories (see Blogsy).

PmWiki Good Manners

  • Need SDV filter to exclude category pages (i.e. Category.GroupHeader or Category.Category, user-configurable) (will be similar to groups/BlogId above)

Notes

  • If "Link" field is available, "Title" field in blog editor can be treated as arbitrary. "Link" should be the wiki page name. When link field is empty or unavailable, title & group (the current "BlogId" chosen in the blogging package) will help determine wikipage's $FullName. Use (:title:) markup to specify the page $Titlespaced per usual.
  • I may make it such that the blog "Title" field fills in (:title:) markup later (if so, it will be at the end of the page and automatically remove any other (:title:) markup on the page).
  • Some other recipes may break XMLRPC's functioning. Toying with how to fix this problem. This is an authentication issue; XMLRPC needs to run BEFORE authentication. Most recipes are unneeded when using XMLRPC unless they change how page markup is saved. XMLRPC will probably need to be included directly after setting up passwords, and I may have to change the authentication portions to authenticate the blog software user earlier than waiting for HandleAction.

I will upload a new package and keep the old package linked on the page in case anyone wants to use old Blogger-compatible software with their wiki. It should still work, although I haven't been able to test it. If you have a package compatible with the pre-2014 package, please post specs here for others, I will be updating the main XMLRPC page to reflect the 2014 package once it appears to be basically bug-free:

Old Package:

SoftwareOSVersionSettings that workNotes
MarsEditMac3.6.3System: MT, API:Blogger, Blog ID=GroupUnknown method errors. Can't post. Doesn't list past posts.
MarsEdit doesn't have title field? How can you have a blog post without a title?
Note: Need different blog client entry for each group you want to post in.
MacJournalMac6.0.10Journal->Blog Settings; cancel wizard that pops up; Type=MovableType; Select Blog Id (group) from list.Doesn't download past entries; posting doesn't work. Unknown method errors.
EctoMac3.0.2Do not use "Atom 1.0", "Blogger" or "Vox" - others get something at least.Has console (Window->Console). Shows that mt.supportedTextFilters & mt.getCategoryList methods are missing. Note: Re-opening and closing initial post sometimes crashes app.

Old Notes

Updating for PHP5.x

I'm working on upgrading this package, want to keep notes in case I get interrupted or anyone wants to join in the fray. Here's what I've tested on my PHP5.4 server:

  • Package fails with latest PmWiki. faultcode 105
  • Installed pmwiki-2.0.beta26 -- the last reported "working" version for XMLRPC and installed the base recipe (without .inc upgrade) in a new blank wiki. I get the same fault code I get with the latest PmWiki. The problem is likely php5 related.
  • Package fails (same code) if I upgrade the .inc files to latest from http://gggeek.github.io/phpxmlrpc/ & add in the new .inc to the recipe. The class calls appear to be the same. The problem is likely the actual recipe, not the upstream code.
  • Turned each of Voodoopad & Blogger off, same error, so it's not just one of the interfaces producing a problem.
Problem:
  • XML is being produced, but recipe is not delivering data to the functions included. I can connect, authenticate, etc. in Ecto, but no files are listed. Simply putting ?action=xmlrpc into the browser shows the XML error message nested into XML.

Recipe Files

Hypothesis: The file xmlrpc.php is probably not the problem -- As far as I can tell, it's just doing some general bookkeeping. The functions mapped still exist in the current xmlrpc package. It's the xmlrpc/blogger.php & xmlrpc/voodoopad.php which pull the weight here. The problem is probably in one of these files. I've only tested blogger. Time to split test the two types of file to double check voodoopad doesn't work as well.

Former Progress

I'm out-of-touch on current PmWiki pagestore and grabbing raw markup...AND I'm not up on differences between php4 & php5. So this might be over my head. There are no errors or warnings being thrown in my error console. Also, the problem may be a combination of things. Difficult to debug without error messages on the logs. XES February 04, 2014, at 02:05 PM

Ok, I've fussed with it a lot more. Using Ecto and its console, I have XMLRPC actually talking. Part of the problem is that settings in Ecto have changed and you must use the Movable Type or Movable Type 4 rather than Blogger (which auto-connects to Google, and they don't understand your credentials). Handshakes are made, Ecto gets "Blog" (=PmWiki groups) info, but then it fails with methods that are requested by Ecto but our XMLRPC recipe doesn't provide. Need to figure exactly what it expects, but "Category" (method "mt.getCategoryList") is pretty easy to guess and is the one that I think finally breaks the conversation with a fault code of 1. Should also look into "mt.supportedTextFilters" method, which just throws an "unknown method" fault but doesn't end communications. We might get preliminary communication by simply fixing (or adding) the category method. XES February 04, 2014, at 05:25 PM

Oh, and for the record, I tried again with the old XMLRPC (rather than with the upgraded package) just to check and it also performs the same handshakes. One thing I will do is remove UserAuth. There will have to be a future update to add AuthUser name->password combo to the package. For now I want to restore basic admin access to XMLRPC for simple passworded sites. XES February 04, 2014, at 05:29 PM


API Notes

MetaWeblog API

From the text at http://xmlrpc.scripting.com/metaWeblogApi.html

The blogid, username, password and publish params are as in the Blogger API. newPost returns a string representation of the post id, again as defined by the Blogger API. The struct is where the juice is.

MethodParam(0)Param(1)Param(2)Param(3)Param(4)Param(5)Notes
metaWeblog.newPostblogidusernamepassword(page) structpublish returns string (pagename ("link") of created post)
metaWeblog.editPostpostidusernamepassword(page) structpublish returns true (success)
metaWeblog.getPostpostidusernamepassword   returns (page) struct
metaWeblog.getRecentPostsblogidusernamepasswordnumberOfPosts  returns array of (page) structs
metaWeblog.getCategoriesblogidusernamepassword   returns struct (description, htmlUrl and rssUrl)

Page Struct notes

Page struct contents are the elements as in RSS 2.0:

  • Minimal: title, link and description. For blogging tools that don't support titles and links, the "description" element holds what the Blogger API refers to as "content."
  • For categories, pass an array of strings of names of categories that the post belongs to, named categories.
  • In getPost, the returned value is a struct containing the same elements corresponding to the struct passed to newPost and editPost.

Note: unsupported methods and attributes

The following are completely unsupported in this PmWiki implementation:

  • Namespaces
  • Elements with attributes
  • Enclosures (attachments)
  • metaWeblog.newMediaObject
  • Future functionality: category description, urls.
  • flNotOnHomePage (boolean flag to not include post/page on home page of site)

Other Potential API Resources

MethodParam(0)Param(1)Param(2)Param(3)Param(4)Param(5)Notes
blogger.newPoststr appkeystr blogidstr usernamestr passwordstr contentbool publishstr postid of new post; OR fault
blogger.editPoststr appkeystr postidstr usernamestr passwordstr contentbool publishbool true value; OR fault
blogger.deletePoststr appkeystr postidstr usernamestr passwordbool publish bool true value; OR fault
blogger.getRecentPostsstr appkeystr blogidstr usernamestr passwordint numberOfPosts array of structs containing ISO.8601 dateCreated, str userid, str postid, str content; OR fault
blogger.getUsersBlogsstr appkeystr usernamestr password   array of structs containing str url, str blogid, str blogName; OR fault
blogger.getUserInfostr appkeystr usernamestr password   struct containing str userid, str firstname, str lastname, str nickname, str email, str url; OR fault
metaWeblog.newPoststr blogidstr usernamestr passwordstruct contentbool publish str postid of new post; OR fault
metaWeblog.editPoststr postidstr usernamestr passwordstruct contentbool publish bool true value; OR fault
metaWeblog.getPoststr postidstr usernamestr password   struct containing str userid, ISO.8601 dateCreated, str postid, str description, str title, str link, str permaLink, str mt_excerpt, str mt_text_more, int mt_allow_comments, int mt_allow_pings, str mt_convert_breaks, str mt_keywords; OR fault
metaWeblog.getRecentPostsstr blogidstr usernamestr passwordint numberOfPosts  array of structs containing ISO.8601 dateCreated, str userid, str postid, str description, str title, str link, str permaLink, str mt_excerpt, str mt_text_more, int mt_allow_comments, int mt_allow_pings, str mt_convert_breaks, str mt_keywords; OR fault
metaWeblog.newMediaObjectstr blogidstr usernamestr passwordstruct file  URL to the uploaded file.
mt.getRecentPostTitlesstr blogidstr usernamestr passwordint numberOfPosts  array of structs containing ISO.8601 dateCreated, str userid, str postid, str title; OR fault
mt.getCategoryListstr blogidstr usernamestr password   an array of structs containing str categoryId and str categoryName; OR fault.
mt.getPostCategoriesstr postidstr usernamestr password   an array of structs containing str categoryName, str categoryId, and bool isPrimary; OR fault. Returns a list of all categories to which the post is assigned. isPrimary denotes whether a category is the post's primary category.
mt.setPostCategoriesstr postidstr usernamestr passwordarray categories  bool true value; OR fault. the array categories is an array of structs containing str categoryId and bool isPrimary. Using isPrimary to set the primary category is optional--in the absence of this flag, the first struct in the array will be assigned the primary category for the post.
mt.supportedMethodsn/a     Retrieve information about the XML-RPC methods supported by the server. Return an array of method names supported by the server.
mt.supportedTextFiltersn/a     Retrieve information about the text formatting plugins supported by the server. Return value: an array of structs containing str key and str label. key is the unique str identifying a text formatting plugin, and label is the readable description to be displayed to a user. key is the value that should be passed in the mt_convert_breaks parameter to newPost and editPost.
mt.getTrackbackPingsstr postid     Return value: an array of structs containing str pingTitle (the title of the entry sent in the ping), str pingURL (the URL of the entry), and str pingIP (the IP address of the host that sent the ping). Retrieve the list of TrackBack pings posted to a particular entry. This could be used to programmatically retrieve the list of pings for a particular entry, then iterate through each of those pings doing the same, until one has built up a graph of the web of entries referencing one another on a particular topic.
mt.publishPoststr postidstr usernamestr password   bool true value; OR fault. Publish (rebuild) all of the static files related to an entry from your weblog. Equivalent to saving an entry in the system (but without the ping).
Notes
firstname is the Movable Type username up to the first space character, and lastname is the username after the first space character.
metaWeblog.newPost Notes
the struct content can contain the following standard keys: title, for the title of the entry; description, for the body of the entry; and dateCreated, to set the created-on date of the entry. In addition, Movable Type's implementation allows you to pass in values for five other keys: int mt_allow_comments, the value for the allow_comments field; int mt_allow_pings, the value for the allow_pings field; str mt_convert_breaks, the value for the convert_breaks field; str mt_text_more, the value for the additional entry text; str mt_excerpt, the value for the excerpt field; str mt_keywords, the value for the keywords field; and array mt_tb_ping_urls, the list of TrackBack ping URLs for this entry. If specified, dateCreated should be in ISO.8601 format.
Page Struct Notes
the struct content can contain the following standard keys: title, for the title of the entry; description, for the body of the entry; and dateCreated, to set the created-on date of the entry. In addition, Movable Type's implementation allows you to pass in values for five other keys: int mt_allow_comments, the value for the allow_comments field; int mt_allow_pings, the value for the allow_pings field; str mt_convert_breaks, the value for the convert_breaks field; str mt_text_more, the value for the additional entry text; str mt_excerpt, the value for the excerpt field; str mt_keywords, the value for the keywords field; and array mt_tb_ping_urls, the list of TrackBack ping URLs for this entry. If specified, dateCreated should be in ISO.8601 format.
Notes
link and permaLink are both the URL pointing to the archived post.
Notes
dateCreated is in the timezone of the weblog blogid; link and permaLink are the URL pointing to the archived post

newMediaObject Notes: the struct file should contain two keys: base64 bits (the base64-encoded contents of the file) and str name (the name of the file). The type key (media type of the file) is currently ignored.


Note mostly to myself: if we create a more API-type structure, it may be possible to use 1 API to link to a variety of RPC protocols such as JSON-RPC. Didn't even know it was an option -- see ServePageByJSON and http://kodi.wiki/view/JSON-RPC_API. What I don't know is whether there are blogging clients of the quality listed on this page that work on a JSON back-end or not. XES September 21, 2017, at 04:45 PM

Talk page for the XMLRPC recipe (users).