Re-order children incompatibility with content_moderation

Issue information

From user: sime

Contribution record

Fork management

Problem/Motivation

When using content moderation module, editors are unable to order children if the node is in draft revision.

Steps to reproduce

  1. Install standard profile
  2. Install entity_hierarchy and content_moderation
  3. Enable the default workflow for the basic page
  4. Add a parent field to the basic page
  5. Create a few nodes in hierarchy, all published
  6. Check the /node/TOPNID/children - looks ok.
  7. Create a new version of top page in draft
  8. Check the /node/TOPNID/children - unable to order the children (there are none shown).
  9. Publish the top page
  10. Check the /node/TOPNID/children - looks ok again.

Proposed resolution

I'm still getting my head around how EH works with revisions (eg the moveChildren() method that is called on entity update). I guess there is a case for being able to order the children of the current published version OR the latest draft version. In any case, having no children showing creates a lot of uncertainty for editors.

Remaining tasks

User interface changes

API changes

Data model changes

Edited by drupalbot
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information