From: Ross M K. <ros...@gm...> - 2004-12-14 05:02:05
|
Great work on getting WP to work on Postgres-- Thank you! I was wondering if someone on the list could point me to what needs to be fixed to get the metaWeblog.getRecentPosts XML-RPC call to work. I'm hoping it's just a matter of tweaking a query written for MySQL. Here is a trace of the XML-RPC transaction (sorry-- it's long): Great work on getting WP to work on Postgres-- Thank you! I was wondering if someone on the list could point me to what needs to be fixed to get the metaWeblog.getRecentPosts XML-RPC call to work. I'm hoping it's just a matter of tweaking a query written for MySQL. Here is a trace of the XML-RPC transaction (sorry-- it's long): XML-RPC message sent: 2004-12-13 23:57:06 -0500 URL: http://karchner.com/wp/xmlrpc.php Method name: metaWeblog.getRecentPosts Request text: <?xml version="1.0" encoding="utf-8"?> <methodCall> <methodName>metaWeblog.getRecentPosts</methodName> <params> <param> <value><string>0</string></value> </param> <param> <value><string>myusername</string></value> </param> <param> <value><string>[password]</string></value> </param> <param> <value><int>5</int></value> </param> </params> </methodCall> XML-RPC reply received: 2004-12-13 23:57:08 -0500 URL: http://karchner.com/wp/xmlrpc.php Method name: metaWeblog.getRecentPosts Status code: 200 Succeeded: NO --Parse Error-- Parse Error Title: XML-RPC Response Parsing Failed Parse Error Message: The XML parser could not parse the data. Response text: <blockquote><font face=arial size=2 color=ff0000><b>SQL/DB Error --</b> [<font color=000077>ERROR: invalid input syntax for integer: ""</font>]<pre>Array ( [0] => Array ( [file] => /usr/home/karchner.com/htdocs/wp/wp-includes/wp-db.php [line] => 198 [function] => print_error [class] => wpdb [type] => -> [args] => Array ( ) ) [1] => Array ( [file] => /usr/home/karchner.com/htdocs/wp/wp-includes/wp-db.php [line] => 326 [function] => query [class] => wpdb [type] => -> [args] => Array ( [0] => SELECT * FROM wp_posts WHERE id = '' ) ) [2] => Array ( [file] => /usr/home/karchner.com/htdocs/wp/wp-includes/functions.php [line] => 381 [function] => get_row [class] => wpdb [type] => -> [args] => Array ( [0] => SELECT * FROM wp_posts WHERE id = '' ) ) [3] => Array ( [file] => /usr/home/karchner.com/htdocs/wp/xmlrpc.php [line] => 259 [function] => get_postdata [args] => Array ( [0] => ) ) [4] => Array ( [file] => /usr/home/karchner.com/htdocs/wp/xmlrpc.php [line] => 1560 [function] => post_permalink [args] => Array ( [0] => ) ) [5] => Array ( [file] => /usr/home/karchner.com/htdocs/wp/wp-includes/class-xmlrpcs.php(280) : eval()'d code [line] => 1 [function] => mwrecentposts [args] => Array ( [0] => xmlrpcmsg Object ( [payload] => [methodname] => metaWeblog.getRecentPosts [params] => Array ( [0] => xmlrpcval Object ( [me] => Array ( [string] => 0 ) [mytype] => 1 ) [1] => xmlrpcval Object ( [me] => Array ( [string] => myusername ) [mytype] => 1 ) [2] => xmlrpcval Object ( [me] => Array ( [string] => mypassword ) [mytype] => 1 ) [3] => xmlrpcval Object ( [me] => Array ( [int] => 5 ) [mytype] => 1 ) ) [debug] => 0 ) ) ) [6] => Array ( [file] => /usr/home/karchner.com/htdocs/wp/wp-includes/class-xmlrpcs.php [line] => 280 [function] => eval ) [7] => Array ( [file] => /usr/home/karchner.com/htdocs/wp/wp-includes/class-xmlrpcs.php [line] => 177 [function] => parserequest [class] => xmlrpc_server [type] => -> [args] => Array ( ) ) [8] => Array ( [file] => /usr/home/karchner.com/htdocs/wp/wp-includes/class-xmlrpcs.php [line] => 163 [function] => service [class] => xmlrpc_server [type] => -> [args] => Array ( ) ) [9] => Array ( [file] => /usr/home/karchner.com/htdocs/wp/xmlrpc.php [line] => 2201 [function] => xmlrpc_server [class] => xmlrpc_server [type] => -> [args] => Array ( [0] => Array ( [blogger.newPost] => Array ( [function] => bloggernewpost [signature] => Array ( [0] => Array ( [0] => string [1] => string [2] => string [3] => string [4] => string [5] => string [6] => boolean ) ) [docstring] => Adds a post, blogger-api like ) [blogger.editPost] => Array ( [function] => bloggereditpost [signature] => Array ( [0] => Array ( [0] => boolean [1] => string [2] => string [3] => string [4] => string [5] => string [6] => boolean ) ) [docstring] => Edits a post, blogger-api like ) [blogger.deletePost] => Array ( [function] => bloggerdeletepost [signature] => Array ( [0] => Array ( [0] => boolean [1] => string [2] => string [3] => string [4] => string [5] => boolean ) ) [docstring] => Deletes a post, blogger-api like ) [blogger.getUsersBlogs] => Array ( [function] => bloggergetusersblogs [signature] => Array ( [0] => Array ( [0] => array [1] => string [2] => string [3] => string ) ) [docstring] => returns the user's blogs - this is a dummy function, just so that BlogBuddy and other blogs-retrieving apps work ) [blogger.getUserInfo] => Array ( [function] => bloggergetuserinfo [signature] => Array ( [0] => Array ( [0] => struct [1] => string [2] => string [3] => string ) ) [docstring] => gives the info about a user ) [blogger.getPost] => Array ( [function] => bloggergetpost [signature] => Array ( [0] => Array ( [0] => struct [1] => string [2] => string [3] => string [4] => string ) ) [docstring] => fetches a post, blogger-api like ) [blogger.getRecentPosts] => Array ( [function] => bloggergetrecentposts [signature] => Array ( [0] => Array ( [0] => array [1] => string [2] => string [3] => string [4] => string [5] => int ) ) [docstring] => fetches X most recent posts, blogger-api like ) [blogger.getTemplate] => Array ( [function] => bloggergettemplate [signature] => Array ( [0] => Array ( [0] => string [1] => string [2] => string [3] => string [4] => string [5] => string ) ) [docstring] => returns the default template file's code ) [blogger.setTemplate] => Array ( [function] => bloggersettemplate [signature] => Array ( [0] => Array ( [0] => boolean [1] => string [2] => string [3] => string [4] => string [5] => string [6] => string ) ) [docstring] => saves the default template file's code ) [metaWeblog.newPost] => Array ( [function] => mwnewpost [signature] => Array ( [0] => Array ( [0] => string [1] => string [2] => string [3] => string [4] => struct [5] => boolean ) ) [docstring] => Add a post, MetaWeblog API-style ) [metaWeblog.editPost] => Array ( [function] => mweditpost [signature] => Array ( [0] => Array ( [0] => boolean [1] => string [2] => string [3] => string [4] => struct [5] => boolean ) ) [docstring] => Edit a post, MetaWeblog API-style ) [metaWeblog.getPost] => Array ( [function] => mwgetpost [signature] => Array ( [0] => Array ( [0] => struct [1] => string [2] => string [3] => string ) ) [docstring] => ) [metaWeblog.getRecentPosts] => Array ( [function] => mwrecentposts [signature] => Array ( [0] => Array ( [0] => array [1] => string [2] => string [3] => string [4] => int ) ) [docstring] => ) [metaWeblog.getCategories] => Array ( [function] => mwgetcats [signature] => Array ( [0] => Array ( [0] => array [1] => string [2] => string [3] => string ) ) [docstring] => Get a post, MetaWeblog API-style ) [metaWeblog.newMediaObject] => Array ( [function] => mwnewmedia [signature] => Array ( [0] => Array ( [0] => struct [1] => string [2] => string [3] => string [4] => struct ) ) [docstring] => Upload image or other binary data, MetaWeblog API-style (unimplemented) ) [mt.getCategoryList] => Array ( [function] => mwgetcats [signature] => Array ( [0] => Array ( [0] => array [1] => string [2] => string [3] => string ) ) [docstring] => Get a post, MetaWeblog API-style ) [mt.getPostCategories] => Array ( [function] => mt_getPostCategories [signature] => Array ( [0] => Array ( [0] => array [1] => string [2] => string [3] => string ) ) [docstring] => Returns a list of all categories to which the post is assigned. ) [mt.setPostCategories] => Array ( [function] => mt_setPostCategories [signature] => Array ( [0] => Array ( [0] => boolean [1] => string [2] => string [3] => string [4] => array ) ) [docstring] => Sets the categories for a post ) [mt.publishPost] => Array ( [function] => mt_publishPost [signature] => Array ( [0] => Array ( [0] => boolean [1] => string [2] => string [3] => string ) ) [docstring] => Publish (rebuild) all of the static files related to an entry. Equivalent to saving an entry in the system (but without the ping). ) [mt.supportedMethods] => Array ( [function] => mt_supportedMethods [signature] => Array ( [0] => Array ( [0] => array ) ) [docstring] => Retrieve information about the XML-RPC methods supported by the server. ) [mt.supportedTextFilters] => Array ( [function] => mt_supportedTextFilters [signature] => Array ( [0] => Array ( [0] => array ) ) [docstring] => Retrieve information about the text formatting plugins supported by the server. (not implemented) ) [mt.getRecentPostTitles] => Array ( [function] => mt_getRecentPostTitles [signature] => Array ( [0] => Array ( [0] => array [1] => string [2] => string [3] => string [4] => int ) ) [docstring] => Returns a bandwidth-friendly list of the most recent posts in the system. ) [mt.getTrackbackPings] => Array ( [function] => mt_getTrackbackPings [signature] => Array ( [0] => Array ( [0] => array [1] => string ) ) [docstring] => Retrieve the list of Trackback pings posted to a particular entry. (not implemented) ) [b2.newPost] => Array ( [function] => b2newpost [signature] => Array ( [0] => Array ( [0] => string [1] => string [2] => string [3] => string [4] => string [5] => string [6] => boolean [7] => string [8] => string [9] => string ) ) [docstring] => Adds a post, blogger-api like, +title +category +postdate ) [b2.getCategories] => Array ( [function] => b2getcategories [signature] => Array ( [0] => Array ( [0] => string [1] => string [2] => string [3] => string ) ) [docstring] => given a blogID, gives a struct that list categories in that blog, using categoryID and categoryName. categoryName is there so the user would choose a category name from the client, rather than just a number. however, when using b2.newPost, only the category ID number should be sent. ) [b2.ping] => Array ( [function] => b2ping [signature] => [docstring] => ) [pingback.ping] => Array ( [function] => pingback_ping [signature] => Array ( [0] => Array ( [0] => string [1] => string [2] => string ) ) [docstring] => Gets a pingback and registers it as a comment prefixed by <pingback /> ) [b2.getPostURL] => Array ( [function] => pingback_getPostURL [signature] => Array ( [0] => Array ( [0] => string [1] => string [2] => string [3] => string [4] => string [5] => string ) ) [docstring] => Given a blog ID, username, password, and a post ID, returns the URL to that post. ) ) ) ) ) </pre></font></blockquote> |
From: Toni T. <tti...@us...> - 2004-12-15 00:30:32
|
On Tue, Dec 14, 2004 at 12:01:56AM -0500, Ross M Karchner wrote: > Great work on getting WP to work on Postgres-- Thank you! Thanks. Actually I just happen to be one that has made a debian package for the wordpress-pg and hanging around in this mailing list, not the original developer. >=20 > I was wondering if someone on the list could point me to what needs to > be fixed to get the metaWeblog.getRecentPosts XML-RPC call to work.=20 > I'm hoping it's just a matter of tweaking a query written for MySQL. Sure. >=20 > Here is a trace of the XML-RPC transaction (sorry-- it's long): > Great work on getting WP to work on Postgres-- Thank you! > > [A long output, deleted] Ok, I don't know which version of xmlrpc/wordpress you happen to use here. There is no xmlrpc.php in the 1.2.1 version, but I managed to generate similar error messages by using (debianized) wordpress-pg-1.2.1+1.0-2 and including xmlrpc.php from earlier packaging wordpress-1.2.0-1.1 (available from http://ftp.debian.org/debian/pool/main/w/wordpress/ or directly from http://ftp.debian.org/debian/pool/main/w/wordpress/wordpress_1.2.0.orig.tar= =2Egz ) Here is a patch against it to make the metaWeblog.getRecentPosts work. diff -ub xmlrpc.php /usr/share/wordpress/xmlrpc.php --- xmlrpc.php 2004-05-22 01:17:51.000000000 +0300 +++ /usr/share/wordpress/xmlrpc.php 2004-12-15 02:06:02.000000000 +0200 @@ -1554,10 +1554,10 @@ =20 $post =3D get_extended($entry['post_content']); =20 - $postid =3D new xmlrpcval($entry['ID']); + $postid =3D new xmlrpcval($entry['id']); $title =3D new xmlrpcval(stripslashes($entry['post_title'])); $description =3D new xmlrpcval(stripslashes($post['main'])); - $link =3D new xmlrpcval(post_permalink($entry['ID'])); + $link =3D new xmlrpcval(post_permalink($entry['id'])); $permalink =3D $link; =20 $extended =3D new xmlrpcval(stripslashes($post['extended'])); ---------------- A sample usage/test session: toni@mario:~/source/wp$ python Python 2.3.4 (#2, Dec 3 2004, 13:53:17)=20 [GCC 3.3.5 (Debian 1:3.3.5-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import xmlrpclib >>> server =3D xmlrpclib.Server("http://localhost/blog/xmlrpc.php") >>> server.metaWeblog.getRecentPosts("0","*****","*****",5) [{'permalink': 'http://mario.datanet/blog/index.php?m=3D200411#post-2', 'de= scription': 'joo..', 'title': 'Hmm..', 'mt_excerpt': '', 'userid': '1', 'da= teCreated': <DateTime u'20041130T16:20:20' at 403decec>, 'link': 'http://ma= rio.datanet/blog/index.php?m=3D200411#post-2', 'mt_text_more': '', 'mt_allo= w_comments': 1, 'postid': '2', 'categories': [''], 'mt_allow_pings': 1}, {'= permalink': 'http://mario.datanet/blog/index.php?m=3D200411#post-1', 'descr= iption': 'Welcome to WordPress. This is the first post. Edit or delete it, = then start blogging!', 'title': 'Hello world!', 'mt_excerpt': '', 'userid':= '1', 'dateCreated': <DateTime u'20041129T00:22:06' at 403fc52c>, 'link': '= http://mario.datanet/blog/index.php?m=3D200411#post-1', 'mt_text_more': '',= 'mt_allow_comments': 1, 'postid': '1', 'categories': ['General'], 'mt_allo= w_pings': 1}] >>>=20 toni@mario:~/source/wp$ Seems to work fine now. --=20 Toni Timonen "toni dot timonen at iki dot fi" NP Solutions Ltd Helsinki University of Technology Department of Engineering Physics and Mathematics |
From: Ross M K. <ros...@gm...> - 2004-12-28 15:25:14
|
Will toni's patch be applied to CVS? On Wed, 15 Dec 2004 02:33:23 +0200, Toni Timonen <tti...@us...> wrote: > On Tue, Dec 14, 2004 at 12:01:56AM -0500, Ross M Karchner wrote: > > Great work on getting WP to work on Postgres-- Thank you! > > Thanks. Actually I just happen to be one that has made a debian > package for the wordpress-pg and hanging around in this mailing list, > not the original developer. > > > > > I was wondering if someone on the list could point me to what needs to > > be fixed to get the metaWeblog.getRecentPosts XML-RPC call to work. > > I'm hoping it's just a matter of tweaking a query written for MySQL. > > Sure. > > > > > Here is a trace of the XML-RPC transaction (sorry-- it's long): > > Great work on getting WP to work on Postgres-- Thank you! > > > > [A long output, deleted] > > Ok, I don't know which version of xmlrpc/wordpress you happen to use > here. There is no xmlrpc.php in the 1.2.1 version, but I managed to > generate similar error messages by using (debianized) > wordpress-pg-1.2.1+1.0-2 and including xmlrpc.php from earlier > packaging wordpress-1.2.0-1.1 (available from > http://ftp.debian.org/debian/pool/main/w/wordpress/ or directly from > http://ftp.debian.org/debian/pool/main/w/wordpress/wordpress_1.2.0.orig.tar.gz > ) > > Here is a patch against it to make the metaWeblog.getRecentPosts > work. > > diff -ub xmlrpc.php /usr/share/wordpress/xmlrpc.php > --- xmlrpc.php 2004-05-22 01:17:51.000000000 +0300 > +++ /usr/share/wordpress/xmlrpc.php 2004-12-15 02:06:02.000000000 +0200 > @@ -1554,10 +1554,10 @@ > > $post = get_extended($entry['post_content']); > > - $postid = new xmlrpcval($entry['ID']); > + $postid = new xmlrpcval($entry['id']); > $title = new xmlrpcval(stripslashes($entry['post_title'])); > $description = new xmlrpcval(stripslashes($post['main'])); > - $link = new xmlrpcval(post_permalink($entry['ID'])); > + $link = new xmlrpcval(post_permalink($entry['id'])); > $permalink = $link; > > $extended = new xmlrpcval(stripslashes($post['extended'])); > > ---------------- > > A sample usage/test session: > > toni@mario:~/source/wp$ python > Python 2.3.4 (#2, Dec 3 2004, 13:53:17) > [GCC 3.3.5 (Debian 1:3.3.5-2)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import xmlrpclib > >>> server = xmlrpclib.Server("http://localhost/blog/xmlrpc.php") > >>> server.metaWeblog.getRecentPosts("0","*****","*****",5) > [{'permalink': 'http://mario.datanet/blog/index.php?m=200411#post-2', 'description': 'joo..', 'title': 'Hmm..', 'mt_excerpt': '', 'userid': '1', 'dateCreated': <DateTime u'20041130T16:20:20' at 403decec>, 'link': 'http://mario.datanet/blog/index.php?m=200411#post-2', 'mt_text_more': '', 'mt_allow_comments': 1, 'postid': '2', 'categories': [''], 'mt_allow_pings': 1}, {'permalink': 'http://mario.datanet/blog/index.php?m=200411#post-1', 'description': 'Welcome to WordPress. This is the first post. Edit or delete it, then start blogging!', 'title': 'Hello world!', 'mt_excerpt': '', 'userid': '1', 'dateCreated': <DateTime u'20041129T00:22:06' at 403fc52c>, 'link': 'http://mario.datanet/blog/index.php?m=200411#post-1', 'mt_text_more': '', 'mt_allow_comments': 1, 'postid': '1', 'categories': ['General'], 'mt_allow_pings': 1}] > >>> > toni@mario:~/source/wp$ > > Seems to work fine now. > > -- > Toni Timonen "toni dot timonen at iki dot fi" > NP Solutions Ltd > Helsinki University of Technology > Department of Engineering Physics and Mathematics > > > |
From: William A.C. <wil...@ca...> - 2004-12-28 17:49:48
Attachments:
smime.p7s
|
The code in the patch isn't there any more. On the trunk (tracking WP 1.3 dev work), the code has been changed from an import of the WP-MySQL work and the patch no longer applies. As you point out, the 1.2.1 release didn't contain the file in question. It seems a little strange to reimport a file that was deleted from the parent distribution and add a patch to it all on a release branch for 1.2.1, but maybe that's just me... ;-) The file does exist in 1.2.2 though and we need to get 1.2.2 into wp-pg CVS. The import will likely necessitate a 1.2 branch. My day job calls, but I'll try to get to this soon... On Dec 28, 2004, at 7:24 AM, Ross M Karchner wrote: > Will toni's patch be applied to CVS? > > > On Wed, 15 Dec 2004 02:33:23 +0200, Toni Timonen > <tti...@us...> wrote: >> On Tue, Dec 14, 2004 at 12:01:56AM -0500, Ross M Karchner wrote: >>> Great work on getting WP to work on Postgres-- Thank you! >> >> Thanks. Actually I just happen to be one that has made a debian >> package for the wordpress-pg and hanging around in this mailing list, >> not the original developer. >> >>> >>> I was wondering if someone on the list could point me to what needs >>> to >>> be fixed to get the metaWeblog.getRecentPosts XML-RPC call to work. >>> I'm hoping it's just a matter of tweaking a query written for MySQL. >> >> Sure. >> >>> >>> Here is a trace of the XML-RPC transaction (sorry-- it's long): >>> Great work on getting WP to work on Postgres-- Thank you! >>> >>> [A long output, deleted] >> >> Ok, I don't know which version of xmlrpc/wordpress you happen to use >> here. There is no xmlrpc.php in the 1.2.1 version, but I managed to >> generate similar error messages by using (debianized) >> wordpress-pg-1.2.1+1.0-2 and including xmlrpc.php from earlier >> packaging wordpress-1.2.0-1.1 (available from >> http://ftp.debian.org/debian/pool/main/w/wordpress/ or directly from >> http://ftp.debian.org/debian/pool/main/w/wordpress/ >> wordpress_1.2.0.orig.tar.gz >> ) >> >> Here is a patch against it to make the metaWeblog.getRecentPosts >> work. >> >> diff -ub xmlrpc.php /usr/share/wordpress/xmlrpc.php >> --- xmlrpc.php 2004-05-22 01:17:51.000000000 +0300 >> +++ /usr/share/wordpress/xmlrpc.php 2004-12-15 02:06:02.000000000 >> +0200 >> @@ -1554,10 +1554,10 @@ >> >> $post = get_extended($entry['post_content']); >> >> - $postid = new xmlrpcval($entry['ID']); >> + $postid = new xmlrpcval($entry['id']); >> $title = new >> xmlrpcval(stripslashes($entry['post_title'])); >> $description = new >> xmlrpcval(stripslashes($post['main'])); >> - $link = new >> xmlrpcval(post_permalink($entry['ID'])); >> + $link = new >> xmlrpcval(post_permalink($entry['id'])); >> $permalink = $link; >> >> $extended = new >> xmlrpcval(stripslashes($post['extended'])); >> >> ---------------- >> >> A sample usage/test session: >> >> toni@mario:~/source/wp$ python >> Python 2.3.4 (#2, Dec 3 2004, 13:53:17) >> [GCC 3.3.5 (Debian 1:3.3.5-2)] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >>>>> import xmlrpclib >>>>> server = xmlrpclib.Server("http://localhost/blog/xmlrpc.php") >>>>> server.metaWeblog.getRecentPosts("0","*****","*****",5) >> [{'permalink': 'http://mario.datanet/blog/index.php?m=200411#post-2', >> 'description': 'joo..', 'title': 'Hmm..', 'mt_excerpt': '', 'userid': >> '1', 'dateCreated': <DateTime u'20041130T16:20:20' at 403decec>, >> 'link': 'http://mario.datanet/blog/index.php?m=200411#post-2', >> 'mt_text_more': '', 'mt_allow_comments': 1, 'postid': '2', >> 'categories': [''], 'mt_allow_pings': 1}, {'permalink': >> 'http://mario.datanet/blog/index.php?m=200411#post-1', 'description': >> 'Welcome to WordPress. This is the first post. Edit or delete it, >> then start blogging!', 'title': 'Hello world!', 'mt_excerpt': '', >> 'userid': '1', 'dateCreated': <DateTime u'20041129T00:22:06' at >> 403fc52c>, 'link': >> 'http://mario.datanet/blog/index.php?m=200411#post-1', >> 'mt_text_more': '', 'mt_allow_comments': 1, 'postid': '1', >> 'categories': ['General'], 'mt_allow_pings': 1}] >>>>> >> toni@mario:~/source/wp$ >> >> Seems to work fine now. >> >> -- >> Toni Timonen "toni dot timonen at iki dot fi" >> NP Solutions Ltd >> Helsinki University of Technology >> Department of Engineering Physics and Mathematics >> >> >> > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Wordpress-pg-devel mailing list > Wor...@li... > https://lists.sourceforge.net/lists/listinfo/wordpress-pg-devel |