Inline paragraph blocks in a published revision have their content removed if a new draft is created with an edited version of the paragraph

Created on 4 October 2019, over 4 years ago
Updated 14 June 2023, about 1 year ago

The site I'm maintaining utilizes layout builder and paragraph blocks along with content moderation and workflows. I ran into an issue where creating a new draft after a node has been published will erase the paragraph content inside the published revision if that same paragraph has been edited in the new draft. The only seems to happen after a revision has been published, inline paragraph blocks edited in the layout builder behave normal before that point. The breakdown seems to occur once the "current" (published) revision is being juggled along with a new "latest revision". It is also worthwhile to note that I didn't see this occur on a test content type that didn't use layout builder.

Steps to reproduce:

  1. You will need the custom block module (core) and entity reference revision module in addition to paragraphs.
  2. Create a content type that utilizes layout builder and allows overrides on a per node basis.
  3. Enable a moderation workflow on this content type.
  4. Create a paragraph entity with some test fields.
  5. Create a custom paragraph block type utilizing this paragraph with the "custom blocks" module
  6. Create a new node, save it as a draft.
  7. Edit this node and click on the layout builder tab.
  8. Add a paragraph block into the layout, add sample text to the fields. Save the layout and "publish" the node.
  9. View the published revisions and note the fields inside of the paragraph. They should be present.
  10. Edit the node, click on the layout builder tab and edit the paragraph fields, maybe adding some more text. Save the layout as a draft.
  11. Compare the current revision (published) with the latest revision (draft), you may find that the content inside the paragraph no longer renders on the published current revision, but appears fine in the draft revision.

I expected the paragraph block content to remain unchanged in the current live revision, instead it appears as if the content inside the paragraph block is deleted or not rendering for some reason once a draft is created. I did not expect the creation of a new revision to effect the content within the published revision.

In addition, when attempting to edit the block that no longer renders on the published revision, I received a "you do not have permission to edit or delete this block" alert. So content editors are effectively locked out of making any content changes to the effected blocks containing paragraphs.

I was curious to see if this might be an issue with paragraphs, so I created a test content type (without layout builder) that adds paragraphs through the usual entity reference field. This content type also had content moderation enabled. I went through the same steps, although this method does not use paragraph blocks, the paragraph behaved normally in this scenario when layout builder was not being used. So I suspect this glitch might lie within the layout builder module.

As of yet I have not gotten into any code debugging since I just ran across this and was searching to see if this was a known issue with a patch. Has anyone had this problem with paragraph blocks in the layout builder?

I set the priority to "major" as this seems to effect published content, when in practice creating a draft revision should not effect the published one so it may be fairly serious. This does not seem to effect regular core blocks, just the custom blocks using the paragraphs.

πŸ› Bug report
Status

Closed: won't fix

Version

9.5

Component
Layout builderΒ  β†’

Last updated about 4 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States Poindexterous

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¦πŸ‡ΊAustralia acbramley

    I don't think this issue belongs in the core queue and is covered by the other issues linked here in the paragraphs queue. Closing as such.

    Please feel free to reopen if you disagree.

Production build 0.69.0 2024