Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Oookay. Both of those screenshots show tag. Can you elaborate? How are you looking for cat ID 190?

    Keep in mind, each term (cat or tag) has it’s own ID. You can’t have both with the same.

    Thread Starter Quint

    (@qrahaman)

    In the first screenshot the url is requesting a category with ID of 190. There is no category with an ID of 190 in the Theme Unit Test data. However, there is a tag with an ID of 190. So, the first screenshot should not have any response; however, it does where the self link is showing a route for a tag with ID 190.

    The second screenshot is correct.

    Thread Starter Quint

    (@qrahaman)

    Also wanted to add that in an earlier beta, the following https://localhost/wp-json/wp/v2/posts?per_page=0 would return all of the posts. In Beta 4, it returns the default of 10 posts.

    FYI: https://localhost/wp-json/wp/v2/terms/category?per_page=0, returns all categories.

    Moderator Marius L. J.

    (@clorith)

    I believe 0 returns the default value set under Settings, providing -1 should return all (much like WP_Query functions).

    I’ll drop this thread over in the WP-API teams channel, they’re in the best position to look into regressions or inconsistencies on the endpoints at this point.

    Daniel Bachhuber

    (@danielbachhuber)

    In the first screenshot the url is requesting a category with ID of 190. There is no category with an ID of 190 in the Theme Unit Test data. However, there is a tag with an ID of 190. So, the first screenshot should not have any response; however, it does where the self link is showing a route for a tag with ID 190.

    This is a bug — thanks for the detailed report. I’ve filed an issue to get it fixed.

    I believe 0 returns the default value set under Settings, providing -1 should return all (much like WP_Query functions).

    We actually disable this ability, to prevent unbounded queries on production sites, which can cause performance issues.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Incorrect Route WordPress 4.4 Beta 4’ is closed to new replies.