Opened 9 years ago

Closed 8 years ago

#162 closed defect (invalid)

Number of pages loaded tied to Reading Settings

Reported by: raanan Owned by: jb6262
Priority: minor Milestone: 2.0
Component: Other Version: 1.4 beta
Keywords: Cc:



"The number of displaying pages on iphone app depends of "Blog pages show at most" option in Settings->Reading section in my wordpress website, so what ever I put the number there let say 3 I got 3 displaying pages in my iphone app, if I put 2 I got displaying only 2 pages etc etc....

I think this is huge bug !"

Change History (9)

comment:1 Changed 9 years ago by janakirampalepu

"The number of displaying pages on iphone app depends the number of Pages returned by the wp.getPages "

i.e the number of pages returned by wp.getPages is being displayed by the iPhone app.

comment:2 Changed 9 years ago by josephscott

janakirampalepu -

I'm not sure what you mean. The wp.getPages method has a parameter that indicates how many pages you want returned and it defaults to 10.

comment:3 Changed 9 years ago by raanan

  • Milestone changed from 1.3 to 1.4
  • Owner set to jb62
  • Priority changed from major to minor
  • Status changed from new to assigned

John -- can you confirm that this is a bug when you have a sec.

comment:4 Changed 8 years ago by iammattthomas

  • Owner changed from jb62 to jb6262

Don't think JB was seeing the notes here because the owner wasn't set quite right. Is this something we want to get in 1.4 or can it be held over?

comment:5 Changed 8 years ago by iammattthomas

  • Version changed from 1.21 to 1.4 beta

I've managed to figure out what's happening here:

In the WP web admin, under Settings > Reading, the setting that controls "Blog pages show at most X posts" is (incorrectly) being used to set how many pages appear in the app. This is reproducible in the following way:

  • Set up a blog with X number of pages (more than 1)
  • Change the "Blog pages show at most" setting to 1
  • Refresh the Pages tab in the iPhone app. All but 1 page will disappear.

This appears to be an incorrect use of the setting -- the number of posts on a page shouldn't be in any way connected to the number of pages displayed in the app.

comment:6 Changed 8 years ago by jb6262

Yes- that's what I've discovered too. At this point I haven't determined if the app is doing anything with that setting or if it's something in what the WP server sends to the app...

Joseph and I exchanged some e-mails, but some other urgencies intervened...

I'll take a deeper look.

comment:7 Changed 8 years ago by jb6262

OK dug into BDM and found where we call the XMLRPC to get the pages...

When I change Settings > Reading > Blog pages show at most to (1) on the blog itself, the array I get back from the XMLRPC request contains only one page’s info. If I change that setting to 10, I get 10 back from the WP server. This happens on a self-hosted as well as a WP-hosted blog.

My take is that if changing a setting on the blog creates different behavior at the first point the data comes into the iPhone app - it indicates something happening with the WP Server-side. I'll check with Joseph and confirm...

comment:8 Changed 8 years ago by jb6262

I used an HTTP client to ping my blog... (No iPhone app in the loop) and could reproduce this behavior. As far as I can tell, that setting controls what the WP server returns for the wp.getPages method. I.E. the problem is not in the app... I'll ping Joseph and ask if he can take a look...

comment:9 Changed 8 years ago by jb6262

  • Resolution set to invalid
  • Status changed from assigned to closed

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 in)

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


















Note: See TracTickets for help on using tickets.