Nodes saved via inline entity form with no moderation state receive default moderation state

Created on 18 April 2024, 7 months ago

Problem/Motivation

If a node doesn't have a moderation state and is saved via an inline entity form it will receive the default moderation state. If this state is not a published value then this can cause previously published nodes to be unpublished. This could occure if moderation is enabled on node types with already moderated nodes.

Steps to reproduce

  1. Make a default moderation state of draft which is unpublished
  2. Make a moderation state of published which is published
  3. Create a node type with moderation not enabled.
  4. Publish the node
  5. Create a node type with moderation enabled.
  6. Create a reference from the moderatable node to the unmoderatable node
  7. Publish the node
  8. Enable the inline entity form module
  9. Make the previously unmoderatable node type moderateable
  10. Using inline entity form, update that node and save the parent page
  11. This will unpublish the inline node as it receives the default moderation state.

Proposed resolution

Nodes that are already published should receive the moderation state that maps to published if they don't already have one.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

achap 🇦🇺

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024