[wp-trac] [WordPress Trac] #65335: Show a warning message about a commented-out Gutenberg block in the Classic Editor.

WordPress Trac noreply at wordpress.org
Mon May 25 06:23:33 UTC 2026


#65335: Show a warning message about a commented-out Gutenberg block in the Classic
Editor.
------------------------------------+-----------------------------
 Reporter:  blackstar1991           |      Owner:  (none)
     Type:  feature request         |     Status:  new
 Priority:  normal                  |  Milestone:  Awaiting Review
Component:  General                 |    Version:  7.0
 Severity:  normal                  |   Keywords:
  Focuses:  ui, accessibility, css  |
------------------------------------+-----------------------------
 **What problem does this address?**

 When a post or page contains Gutenberg block markup inside HTML comments,
 the [https://wordpress.com/support/editors/classic-editor-guide/ Classic
 Editor] can create a misleading editing experience.
 [[Image("https://i.ibb.co/LDGJFFsq/597177196-80e9b120-2aca-
 45a8-9eb4-5594c2a575ea.png")]]
 In the Code/Text tab, the content technically exists because the Gutenberg
 block markup is present in the post content, for example:

 {{{
 <!-- wp:group {"backgroundColor":"black","layout":{"type":"constrained"}}
 -->
 <div class="wp-block-group has-black-background-color has-background"><!--
 wp:gigroute-events/events
 {"titleStyles":{"textAlign":"center","color":"","fontSize":"24px","fontFamily":"Roboto,
 sans-
 serif","fontWeight":"700","lineHeight":"","spacing":{"margin":{"top":"20px","right":"","bottom":"20px","left":""},"padding":{"top":"24px","right":"24px","bottom":"24px","left":"24px"}}},"archiveUrl":"/tourdates/","dateDisplayFormat":"long_date","fullEventClick":true,"className":"bg_cover60
 animation-show
 ","style":{"background":{"backgroundImage":{"url":"http://brothersofmetal.loc
 /wp-content/uploads/2026/03/bom_fire-
 large.jpg","id":300,"source":"file","title":"bom_fire-
 large"},"backgroundSize":"contain","backgroundRepeat":"no-
 repeat","backgroundPosition":"50%
 0%"},"spacing":{"padding":{"bottom":"54px"}}}} /--></div>
 <!-- /wp:group -->
 }}}


 However, because this block-related markup is stored inside HTML comments,
 it may not be visible in the Visual tab of the Classic Editor. As a
 result, the Visual editor can make the page appear empty or incomplete,
 even though the post content still contains Gutenberg block data.

 This can confuse editors and create two main risks:

 Editors may accidentally overwrite or delete existing block content
 because they assume the page is empty.
 Editors may unknowingly keep unused or outdated block markup in the page
 content, even when it is no longer used visually. This can unnecessarily
 clutter the page content and may negatively affect content quality,
 maintenance, or SEO analysis.

 The issue is specifically related to WordPress/Gutenberg block comments
 and serialized block markup, not ordinary HTML comments. A warning should
 only appear when WordPress block syntax is detected.

 **What is your proposed solution?**

 Add a warning or informational notice in the Classic Editor when the post
 content contains Gutenberg block markup that is present in the Code/Text
 tab but is not visibly rendered in the Visual tab.

 For example, the Classic Editor could display a non-intrusive notice such
 as:

 [[Image("https://i.ibb.co/yB0fDvgT/597177157-6cd9ddea-a6c2-488e-8d7d-
 7f3f3b9dcad7.png")]]

 This content includes Gutenberg block markup that may be visible in the
 Code/Text tab but not in the Visual editor. The page may not be empty.
 Please review the content carefully before overwriting or deleting it.

 The detection should focus specifically on WordPress block syntax, such as
 comments starting with:


 {{{
 <!-- wp:
 }}}

 and should not trigger for regular HTML comments.

 This warning would help editors understand that the page may contain
 hidden block-related content even if the Visual tab appears empty. It
 would reduce the risk of accidentally removing valid content, while also
 helping editors identify and clean up unused block markup that is no
 longer needed.

 A possible implementation could be a dismissible admin notice or an inline
 warning near the Classic Editor content area when block markup is detected
 in the post content.

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


More information about the wp-trac mailing list