Wrong paging when retrieving categories list #2309
Comments
@ssmagin Which version of the API are you using? |
I use Version 2.0-beta12 |
@ssmagin and how many categories do you have total? can you more clearly communicate the response you're seeing, and the response you'd expect to see? |
I've tried reproducing this, and I can't, so I'm keen for more details which can point me in the right direction. |
I have a test blog with 18 categories. Requests with parameter per_page=10 works correctly: |
Thanks for the details, @ssmagin. I've been able to identify this as a bug with core: https://core.trac.wordpress.org/ticket/35935 It's easy for us to include a fix for, though, so we'll have it addressed in the next beta. In the interim, you could apply 4a0e3e5 locally if you need an immediate fix. |
The following requests return the same result (for per_page >10):
http://blog.lo/wp-json/wp/v2/categories?page=1&per_page=100
http://blog.lo/wp-json/wp/v2/categories?page=2&per_page=100
......
http://blog.lo/wp-json/wp/v2/categories?page=1232&per_page=100
But the following requests work correctly:
http://blog.lo/wp-json/wp/v2/categories?page=1&per_page=10
http://blog.lo/wp-json/wp/v2/categories?page=2&per_page=10
......
http://blog.lo/wp-json/wp/v2/categories?page=1232&per_page=10
The text was updated successfully, but these errors were encountered: