gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Table content disappeared after reopening saved post draft

Open vesaraiskila opened this issue 7 years ago • 9 comments

Describe the bug Tables with formatted text in HTML block had all their text disappeared when reopening saved post draft

To Reproduce Steps to reproduce the behavior:

  1. Create an HTML block.

  2. Insert a table as follows (which Gutenberg accepts):

  1. Add HTML formatted text between the and tags, eg.:


Maan korkeimman neuvoston päätöslauselma

etc. 4. Preview, save, preview... ascertaining that all seems to be OK. 5. Save the post draft and exit. 6. Reopen the draft for editing.

Expected behavior The text should exist in the tables as it was when previewed and saved.

Observed behavior The content in all the tables in the post draft had cleared. Only the HTML tags, shown above, marking the tables remained.

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 7
  • Browser: Opera
  • Version: 57.0.3098.106

Additional context

  • Please add the version of Gutenberg you are using in the description.
  • Didn't find a way to check Gutenberg version

vesaraiskila avatar Dec 27 '18 23:12 vesaraiskila

Steps shown visually, as they don't appear to be displayed properly above:

image

vesaraiskila avatar Dec 27 '18 23:12 vesaraiskila

Just reproduced this: I restored the HTML formatted text from backups into the tables, previewed, saved, exited the post draft, reopened the post draft, and the tables' content had disappeared in the editor.

However, if one opens the Versions view, the content is there - it is just not available in the editor:

image

vesaraiskila avatar Dec 27 '18 23:12 vesaraiskila

After I reported this, I have reproduced the bug several times. In the most disasterous case, when reopening a published post for re-editing, not only is the entire content of the table lost apart from the heading, but also all the blocks under the table are missing. (Therefore, I no longer dare to edit and re-save the published document.) Please see the screenshots below:

disappeared_table_and_blocks

only_heading_remained

how_it_should_look

vesaraiskila avatar Feb 24 '19 15:02 vesaraiskila

Additional information: when opening the published post, the faulty version (as described above) generated upon opening is automatically saved. Obviously, I do not want to restore that version. However, the "Restore this version" button is disabled for all the previous versions, so I cannot restore an intact version and continue editing the published post.

vesaraiskila avatar Feb 24 '19 15:02 vesaraiskila

Pascal (or others), any comments on this bug and when it could be resolved? To me, it is a very serious one, as it seems to be connected to possible "show-stopper" results in terms of re-editing published posts.

vesaraiskila avatar Feb 26 '19 01:02 vesaraiskila

Does this still happen with the latest version of the Gutenberg plugin and all other plugins disabled?

swissspidy avatar Mar 12 '19 09:03 swissspidy

Hi,

Thanks for looking into this. I'll return to this a bit later after making some checkups.

BR, Vesa

ti 12. maalisk. 2019 klo 11.56 Pascal Birchler ([email protected]) kirjoitti:

Does this still happen with the latest version of the Gutenberg plugin and all other plugins disabled?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WordPress/gutenberg/issues/13121#issuecomment-471932278, or mute the thread https://github.com/notifications/unsubscribe-auth/AsEEIbhkgxKY6D4FbsqQIneTzqszD1Flks5vV3nkgaJpZM4ZjRrh .

vesaraiskila avatar Mar 12 '19 10:03 vesaraiskila

Does this still happen with the latest version of the Gutenberg plugin and all other plugins disabled?

I don't know how to check Gutenberg version; I haven't installed it as a plugin. It came with an earlier WordPress update. My current WordPress version is 5.1.1.

Anyway, I reopened the published post for editing, and there was the error "This block contains unexpected or invalid content" in place of the table containg the list of sources for the article, and everything under the table was missing. I obviously exited the post without changes. Note: I didn't disable all the other plugins for this quick checkup.

vesaraiskila avatar Mar 28 '19 01:03 vesaraiskila

The issue here is that you're using Gutenberg delimitters (blocks) inside a block that doesn't support nested blocks. (custom HTML block). I think this is not something we want to support, just remove the comments around the paragraph tag and it should work as expected.

Thanks.

youknowriad avatar Sep 16 '20 08:09 youknowriad