-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paragraph tags are stripped #3922
Comments
cc @noisysocks because I saw you did some work recently on reusable blocks. |
I'm having trouble reproducing this. Do you have other plugins active on your site? Wondering if one of them may be clobbering the markup when the post is saved. (Aside: The validation message looks backwards, should say "expected tag name |
I have 11 active plugins on my site (which is part of a WordPress network I manage):
|
I've got another way to reproduce this error, so perhaps it hasn't anything to do with ReusableBlocks. Here's the gif: Steps:
When I got back to the editor, the paragraph blocks cannot be processed by Gutenberg: And this is what the console shows at that point: The HTML that's saved looks like this (it contains the paragraph tags and some weird void paragraphs as well):
|
I've tried deactivating Official StatCounter Plugin and RSS Importer and disconnecting Jetpack from my site as well. I've got the same result. Any other test I may do to help? |
@nosolosw Can you try deactivating the Jetpack plugin instead of just disconnecting from WordPress.com? |
Yup, I did that as well (deactivating it at the network level) but got the same result. |
Confirmed that I can reproduce this in Gutenberg 2.0. |
I also had this same problem, however my layout was a bit different: <!-- wp:core/paragraph {"dropCap":true} -->
<p class="has-drop-cap">First Paragraph.</p>
<!-- /wp:core/paragraph -->
<!-- wp:core/paragraph -->
Second paragraph.
<!-- /wp:core/paragraph --> All following paragraph blocks are missing |
I should also add that I also had Jetpack connected, but disabling gutenberg resolved the problem. |
I wonder if it has something to do with |
I can confirm that after @aduth #4874 I can only repro this with these steps if I have the Jetpack's "write post/pages in markdown" option enabled when I convert an old post to Gutenblocks. Perhaps this is worth labeling Plugin / Extension conflict? |
Well... that’s a pretty big conflict. I had to disable Gutenberg just to get content written in Gutenberg to show correct. The only other option was manually editing OUT the Gutenberg html comments in html edit mode. |
Relevant problematic code in Jetpack's Markdown module, removing paragraph tags on save: https://github.com/Automattic/jetpack/blob/c5aea23/modules/markdown/easy-markdown.php#L547-L548 |
Since Jetpack's Markdown module strips paragraphs prior to save, merely deactivating the Markdown module will not retroactively fix broken posts. However, since Gutenberg is capable of "repairing" unwrapped paragraphs, it should† be resolved if opening the post once more and saving it within Gutenberg. In trying this myself, this works as expected, with one exception being that link tags (and I assume may apply to bold, italic, etc) showed the HTML as escaped and needed to be updated before saving. Unsure yet if this is also a conflict introduced with Jetpack's Markdown module. |
With Gutenberg 2.3.0 and Jetpack 5.8 it is no longer an issue (tested following this steps). 🎉 |
Great! Going to consider this closed unless the issue crops up again. |
A gif is worth a thousand words:
Steps to repro:
The text was updated successfully, but these errors were encountered: