WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#10901 closed defect (bug) (worksforme)

wp.getPages gives different results if Blog pages show at most is changed to 1

Reported by: jb6262 Owned by: josephscott
Milestone: Priority: normal
Severity: normal Version:
Component: XML-RPC Keywords:
Focuses: Cc:

Description

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)

  1. Note that only one page comes back
  1. Change the setting on the Blog to 10 and try again
  1. 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>

Change History (5)

comment:1 @jb62626 years ago

  • Cc jb6262 added

comment:2 @josephscott6 years ago

Well the good news that I can't reproduce this on my test install of WP -trunk, so it's probably already been fixed. I need to test this with an older version of WP to confirm this.

comment:3 @iammattthomas6 years ago

I took a minute to test this this morning. The problem was present on my blog when 2.8.5 was installed. I updated to 2.9-rare and it's fixed.

comment:4 @westi6 years ago

Possibly this was fixed by [11850] for #10659?

comment:5 @nacin5 years ago

  • Milestone Unassigned deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.