(EDIT still broken in 2.3.0)
(EDIT 2018-07-04 improved in 3.1.1, shortcodes still broken)
(EDIT 2018-07-21 ^^^^ 3.3.0)
Issue Overview
Classic "Visual" editor litters Gutenberg markup w/ superfluous <p> tags.
This is an issue where occasionally the user might have to revert to using the classic editor, due to Gutenberg metabox rendering JS crashing for whatever reason. Even if the user doesn't touch the content block at all, just loading Gutenberg markup in classic Visual editor will cause it to break on Update.
I do not have Classic Editor plugin activated. Unless this is officially going to be a "run Gutenberg" requirement, I probably shouldn't have to activate it, right?
Steps to Reproduce (for bugs)
- Author a new Gutenberg post with this example markup
<!-- wp:heading -->
<h2>Shinier than yours, meatbag.</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>You can crush me but you can't crush my spirit! Is today's hectic lifestyle making you tense and impatient? It's a T. It goes "tuh". I'll tell them you went down prying the wedding ring off his cold, dead finger.</p>
<!-- /wp:paragraph -->
<!-- wp:shortcode -->
[column grid="2" span="1"]
<!-- /wp:shortcode -->
<!-- wp:paragraph -->
<p>I daresay that Fry has discovered the smelliest object in the known universe! For the last time, I don't like lilacs! Your 'first' wife was the one who liked lilacs! No argument here. A true inspiration for the children.</p>
<!-- /wp:paragraph -->
<!-- wp:shortcode -->
[/column]
<!-- /wp:shortcode -->
<!-- wp:shortcode -->
[column grid="2" span="1"]
<!-- /wp:shortcode -->
<!-- wp:paragraph -->
<p>Hello world.</p>
<!-- /wp:paragraph -->
<!-- wp:shortcode -->
[/column]
<!-- /wp:shortcode -->
- Open this post in classic editor, switch to Visual mode
- Switch back to Text mode to review littered markup
Expected Behavior
Gutenberg markup stays intact
Current Behavior
Littered markup result - shortcodes are wrapped into <p> tags, all block marker comments empty lines get replaced w/ <p> </p>:
<!-- wp:core/heading -->
<h2>Shinier than yours, meatbag.</h2>
<!-- /wp:core/heading -->
<p> </p>
<!-- wp:core/paragraph -->
<p>You can crush me but you can't crush my spirit! Is today's hectic lifestyle making you tense and impatient? It's a T. It goes "tuh". I'll tell them you went down prying the wedding ring off his cold, dead finger.</p>
<!-- /wp:core/paragraph -->
<p> </p>
<!-- wp:core/shortcode -->
<p>[column grid="2" span="1"]</p>
<!-- /wp:core/shortcode -->
<p> </p>
<!-- wp:core/paragraph -->
<p>I daresay that Fry has discovered the smelliest object in the known universe! For the last time, I don't like lilacs! Your 'first' wife was the one who liked lilacs! No argument here. A true inspiration for the children.</p>
<!-- /wp:core/paragraph -->
<p> </p>
<!-- wp:core/shortcode -->
<p>[/column]</p>
<!-- /wp:core/shortcode -->
<p> </p>
<!-- wp:core/shortcode -->
<p>[column grid="2" span="1"]</p>
<!-- /wp:core/shortcode -->
<p> </p>
<!-- wp:core/paragraph -->
<p>Hello world.</p>
<!-- /wp:core/paragraph -->
<p> </p>
<!-- wp:core/shortcode -->
<p>[/column]</p>
<!-- /wp:core/shortcode -->
Possible Solution
Not sure which component is the responsible party - core or Gutenberg - could use pointers.
Screenshots / Video
Related Issues and/or PRs
Maybe #3900? Not sure, could use pointers.
(EDIT still broken in 2.3.0)
(EDIT 2018-07-04 improved in 3.1.1, shortcodes still broken)
(EDIT 2018-07-21 ^^^^ 3.3.0)
Issue Overview
Classic "Visual" editor litters Gutenberg markup w/ superfluous
<p>tags.This is an issue where occasionally the user might have to revert to using the classic editor, due to Gutenberg metabox rendering JS crashing for whatever reason. Even if the user doesn't touch the content block at all, just loading Gutenberg markup in classic Visual editor will cause it to break on Update.
I do not have Classic Editor plugin activated. Unless this is officially going to be a "run Gutenberg" requirement, I probably shouldn't have to activate it, right?
Steps to Reproduce (for bugs)
Expected Behavior
Gutenberg markup stays intact
Current Behavior
Littered markup result - shortcodes are wrapped into
<p>tags, all block marker comments empty lines get replaced w/<p> </p>:Possible Solution
Not sure which component is the responsible party - core or Gutenberg - could use pointers.
Screenshots / Video
Related Issues and/or PRs
Maybe #3900? Not sure, could use pointers.