Skip to content
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

When you edit a Gutenberg comment, it shows "Invalid Content" #24101

Open
kean opened this issue Feb 20, 2025 · 2 comments
Open

When you edit a Gutenberg comment, it shows "Invalid Content" #24101

kean opened this issue Feb 20, 2025 · 2 comments

Comments

@kean
Copy link
Contributor

kean commented Feb 20, 2025

Workaround: the "Attempt Recovery" option fixes the issue.

Note: this feature is currently only supported for P2 sites, which is why it has lower priority.

@dangermattic
Copy link
Collaborator

dangermattic commented Feb 20, 2025

Thanks for reporting! 👍

@kean
Copy link
Contributor Author

kean commented Feb 20, 2025

RCA

The app sends the following content (correctly formatted Gutenberg):

<!-- wp:paragraph -->
<p>test</p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>hello world</code></pre>
<!-- /wp:code -->
  1. The server returns two fields with content:
"content": "<p>Test</p>\n<pre><code>hello world</code></pre>\n",
"raw_content": "<!-- wp:paragraph -->\ntest\n<!-- /wp:paragraph --><!-- wp:code -->\n<pre><code>hello world</code></pre>\n<!-- /wp:code -->",

None of these seem to be what you want for editing. The content is HTML that's used for display. The raw_content contains malformed Gutenberg blocks. For example, paragraph is missing

tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants