[wp-trac] [WordPress Trac] #61157: Blocks Query pagination NEXT & PREV produce incorrect URLs when queried via REST API

WordPress Trac noreply at wordpress.org
Fri May 24 12:01:27 UTC 2024


#61157: Blocks Query pagination NEXT & PREV produce incorrect URLs when queried via
REST API
--------------------------+------------------------------
 Reporter:  yelbaev       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Permalinks    |     Version:  5.8
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  rest-api
--------------------------+------------------------------
Changes (by yelbaev):

 * keywords:  needs-patch reporter-feedback => needs-patch


Comment:

 Replying to [comment:1 poena]:
 > Can you include more detailed information about how to test for this
 problem?
 Steps to replicate on :
 1) Create new page and place a query block in it
 2) Request the page via REST API `/wp-json/wp/v2/pages/$ID` and in content
 -> rendered you'll get a paged URL for NEXT and/or PREV that is
 incorrectly based on API endpoint rather than on page url

 See it [https://yelbaev.com/portfolio/] vs [https://yelbaev.com/wp-
 json/wp/v2/pages/80]
 [[Image(https://tinyurl.com/23acd7ay)]]

 Or here's a short video [https://youtu.be/Uf2Ul730gqM]

 > Also I want to confirm if by adding version 5.8 to the ticket, did you
 mean that the problem was introduced in 5.8, or are you actually testing
 on 5.8 and no later WordPress versions?
 I tracked back from current version to older and found out that this bug
 was in initial block implementation

 > Since this is a problem with a block, did you already search if this has
 been reported in the Gutenberg repository?
 Checked, no open tickets on this matter

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61157#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list