[wp-trac] [WordPress Trac] #58031: query-no-result block is always appeared if post-template block contains post-featured-image block

WordPress Trac noreply at wordpress.org
Sat Apr 1 05:09:17 UTC 2023


#58031: query-no-result block is always appeared if post-template block contains
post-featured-image block
--------------------------+------------------------------
 Reporter:  obache        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Themes        |     Version:  6.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by obache):

 One more important reproducible point is that '''archive page has just one
 post''',
 then `have_posts()` reaches end of loop, and following `have_posts()` is
 `true`.

 Maybe, `qurery-no-results` block should not use `have_posts()`,
 `$found_posts` instead?

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


More information about the wp-trac mailing list