[wp-trac] [WordPress Trac] #10901: wp.getPages gives different results if Blog pages show at most is changed to 1

WordPress Trac wp-trac at lists.automattic.com
Sun Oct 4 18:49:26 UTC 2009


#10901: wp.getPages gives different results if Blog pages show at most is changed
to 1
--------------------------+-------------------------------------------------
 Reporter:  jb6262        |       Owner:  josephscott
     Type:  defect (bug)  |      Status:  new        
 Priority:  normal        |   Milestone:  Unassigned 
Component:  XML-RPC       |     Version:             
 Severity:  normal        |    Keywords:             
--------------------------+-------------------------------------------------
 This comes up as a result of testing and working with the iPhone app.  The
 ticket on the iPhone app is here:
 https://iphone.trac.wordpress.org/ticket/162

 Briefly, output from the wp.getPages call appears to be different if the
 "Blog pages show at most" setting is changed to 1.  This was tested and
 verified on a bare-bones wordpress.com blog.

 In that case, the wp.getPages call appears to only return one page,
 regardless of the number of pages in the blog.

 For convenience, the last post in the iPhone app ticket is included below.
 It includes a test to show this problem occuring outside of the iPhone app
 using an HTTP Client tool.

 ========

 Resolving as "invalid" because the problem appears to be on the WP server
 itself. Naturally this should be added as a bug on the WP side, which I
 will do right after finishing this ticket.

 Steps to reproduce this proof...

 1. Change Settings>Reading>Blog pages show at most to [1]

 2 Using an HTTP Client, submit a wp.getPages post to the blog's rpc
 endpoint thus. (Obviously you'll need to your username, password and blog
 id number)

 3. Note that only one page comes back

 4. Change the setting on the Blog to 10 and try again

 5. Note that 10 pages now come back.


 ==========

 To find this data for your blog(s), put the following line in
 XMLRPCEncoder.m : -encode just before the return statement at the end of
 the method. Put a breakpoint on that line, then compile the app, and
 delete and re-add your blog. Continue through the breakpoint several times
 (one for each different method call to the WP Server) and you will get the
 wp.getPages call on the 6th or 7th try.

 The NSLog line will output the XML being used to build the XMLRPC
 request... You can then use copy/paste that into an HTTP client tool to
 test.

 NSLog(@"buffer:: %@", buffer);

 Post XML:

 <?xml version="1.0"?>
 <methodCall>

     <methodName>wp.getPages</methodName>

         <params>

             <param>

                 <value>

                     <string>YourBlogIDNumber</string>

                 </value>

             </param>
             <param>

                 <value>

                     <string>YourUserName</string>

                 </value>

             </param>
             <param>

                 <value>

                     <string>YourPassword</string>

                 </value>

             </param>

         </params>

 </methodCall>

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10901>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list