[wp-trac] [WordPress Trac] #35172: WordPress 4.4 pagination not working - Fix for 34060 broke backward compatibility

WordPress Trac noreply at wordpress.org
Mon Dec 21 12:41:11 UTC 2015


#35172: WordPress 4.4 pagination not working - Fix for 34060 broke backward
compatibility
-------------------------------------+------------------------------
 Reporter:  bobbingwide              |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Query                    |     Version:  4.4
 Severity:  normal                   |  Resolution:
 Keywords:  reporter-feedback close  |     Focuses:
-------------------------------------+------------------------------

Comment (by bobbingwide):

 Hi boone, thanks for your answers.

 > Should I take away from this comment

 Yes, (a) I think it should be the other way round - paged takes precedence
 and (b) It would be nice if WordPress could handle the combinations of
 offset and paged sensibly.

 After raising this issue I found a hideous page on the codex that explains
 the hoops you need to jump through in order to get queries to work with
 both Offset and Pagination.

 https://codex.wordpress.org/Making_Custom_Queries_using_Offset_and_Pagination


 If the expected results from the combinations were more clearly documented
 then it could be more obvious how to use the parameter values.

 There being so little information in #34060 it's difficult to know what
 problem was being addressed.

 One point to consider is the fact that, in my experience, for an unpaged
 query, there didn't seem to be any difference between offset 0 and offset
 1.

 I would guess that in most cases, we weren't exploiting the bug
 intentionally, we'd just copied some code from get_posts() and blindly
 used the default values.
 And that leads to the big surprise when backward compatibility is broken.

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


More information about the wp-trac mailing list