[wp-trac] [WordPress Trac] #55658: Backport a bugfix of Comment Template block pagination

WordPress Trac noreply at wordpress.org
Tue May 3 14:31:26 UTC 2022


#55658: Backport a bugfix of Comment Template block pagination
---------------------------------------------+-----------------------------
 Reporter:  czapla                           |       Owner:  hellofromTonya
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  6.0
Component:  Comments                         |     Version:  trunk
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+-----------------------------
Changes (by hellofromTonya):

 * owner:  (none) => hellofromTonya
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"53336" 53336]:
 {{{
 #!CommitTicketReference repository="" revision="53336"
 Editor: Sets 'paged' query arg only when there are comments:
 `build_comment_query_vars_from_block()`.

 A SQL syntax error happened when a post has no comments and "Break
 comments into pages" is checked in Settings > Discussion. The fix sets the
 `'paged'` query arg only when there are comments. When there are no
 comments, `WP_Comment_Query` sets the default `'paged'` value to `1`.

 Props bernhard-reiter, luisherranz, czapla, cbravobernal, davidbaumwald,
 hellofromTonya.

 Follow-up to [53142], [53138].
 Fixes #55658.
 }}}

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


More information about the wp-trac mailing list