WordPress-iOS
WordPress-iOS copied to clipboard
When you edit a Gutenberg comment, it shows "Invalid Content"
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.
Thanks for reporting! 👍
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 -->
- 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.