WordPress-iOS icon indicating copy to clipboard operation
WordPress-iOS copied to clipboard

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

Open kean opened this issue 10 months ago • 2 comments

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.

kean avatar Feb 20 '25 17:02 kean

Thanks for reporting! 👍

dangermattic avatar Feb 20 '25 17:02 dangermattic

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.

kean avatar Feb 20 '25 17:02 kean