Gutenberg Blocks Disappear After Preview When Creating New Node Without Saving First

Created on 17 September 2024, 3 months ago

Gutenberg Blocks Disappear After Preview When Creating New Node Without Saving First

When creating a new node with the Gutenberg experience enabled, if you add some blocks and preview the node without saving it first, the Gutenberg blocks disappear upon returning to the content editing mode. However, if you press Command + Z, the blocks reappear.

  1. Install a fresh Drupal 10 site.
  2. Install the Gutenberg module. 3.0.4
  3. Enable the Gutenberg module on a content type.
  4. Add content to a new node and preview it without saving.
  5. Return to the edit mode and observe that all the blocks are missing.
🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇵🇰Pakistan ahmad aziz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ahmad aziz
  • 🇳🇴Norway thorandre

    I confirm this issue. Tested with Drupal 10.2.6 with the gitpod setup with the starter theme.

    Changing priority to Major as it is not taking down the site or destructing other data saved, and there is a simple workaround in actually saving the node. However we'll have to address it soon, as it will feel incredibly annoying the first time you experiencing that if the user has actually put a lot of efforts in producing the content for that unsaved node.

  • 🇳🇴Norway thorandre

    Further investigation shows that this works with the working branch for a newer version of Gutenberg Core, that will go into DG4.0. We'll continue to dig into it still.

Production build 0.71.5 2024