[wp-trac] [WordPress Trac] #62810: Pattern with Query Loop and Cover block renders wrongly in preview

WordPress Trac noreply at wordpress.org
Thu Jan 16 12:38:23 UTC 2025


#62810: Pattern with Query Loop and Cover block renders wrongly in preview
--------------------------+-----------------------------
 Reporter:  radeeven      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:  6.7.1
 Severity:  minor         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi! I wanted to report his bug where my pattern is rendering correctly
 when inserted, but wrongly in its preview (from the block inserter and
 pattern manager). The Title block added to the cover block is given full
 width (alignment), but isn't rendered with it in the preview, only when
 placed. Here is the block markup and screenshots of the rendering.

 I tried installing the Gutenberg plugin to see if the problem has been
 fixed in a future Gutenberg version, and it hasn't.

 This is my first bug report, so please comment on what I can improve for
 future bug reports.

 Block markup:
 {{{
 <!-- wp:query
 {"query":{"perPage":3,"pages":0,"offset":0,"postType":"article","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":null,"parents":[],"format":[]}}
 -->
 <div class="wp-block-query">
 <!-- wp:post-template {"layout":{"type":"grid","columnCount":3}} -->
 <!-- wp:cover
 {"useFeaturedImage":true,"dimRatio":0,"isUserOverlayColor":true,"contentPosition":"bottom
 center","className":"is-style-cover-
 clickable","style":{"dimensions":{"aspectRatio":"2/3"},"border":{"radius":"1rem"},"spacing":{"padding":{"top":"0","bottom":"0","left":"0","right":"0"}}},"layout":{"type":"constrained"}}
 -->
 <div class="wp-block-cover has-custom-content-position is-position-bottom-
 center is-style-cover-clickable" style="border-radius:1rem;padding-top:0
 ;padding-right:0;padding-bottom:0;padding-left:0"><span aria-hidden="true"
 class="wp-block-cover__background has-background-dim-0 has-background-
 dim"></span><div class="wp-block-cover__inner-container">
 <!-- wp:post-title
 {"isLink":true,"align":"full","style":{"spacing":{"padding":{"top":"var:preset|spacing|10","bottom":"var:preset|spacing|10","left":"var:preset|spacing|10","right":"var:preset|spacing|10"}}},"backgroundColor":"base-2","fontSize":"medium"}
 /-->
 </div>
 </div>
 <!-- /wp:cover -->
 <!-- /wp:post-template -->

 <!-- wp:query-no-results -->
 <!-- wp:paragraph {"placeholder":"Add text or blocks that will display
 when a query returns no results."} -->
 <p>Something went wrong</p>
 <!-- /wp:paragraph -->
 <!-- /wp:query-no-results --></div>
 <!-- /wp:query -->
 }}}

 Inserted into a post:
 [[Image(https://tobiasrade.no/wp-
 content/uploads/2025/01/Skjermbilde-2025-01-16-132708.png)]]

 In the block inserter:
 [[Image(https://tobiasrade.no/wp-
 content/uploads/2025/01/Skjermbilde-2025-01-16-133056.png)]]

 In the pattern manager:
 [[Image(https://tobiasrade.no/wp-
 content/uploads/2025/01/Skjermbilde-2025-01-16-133140.png)]]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62810>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list