Closed (fixed)
Project:
Entity Reference Hierarchy
Version:
8.x-2.x-dev
Component:
Code (module)
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
12 Dec 2020 at 00:26 UTC
Updated:
31 Dec 2020 at 00:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
larowlanThis is expected behaviour
The forward revision is not the parent at that stage, the published one is
I will need to think about how to handle this without changes being visible on the live site
Comment #3
simeIn addition to ordering the children of the live revision, our editors want to work on batches of changes of a whole tree in draft mode, which includes ordering the children in the draft view.
In the short term I'm going to add a warning explaining why they can't see any children.
I'm wondering if we need a content staging environment for these big changes.
Comment #4
simeI just realised, I think they have no way of ordering children of the live page if there is a currently draft in progress.
Comment #5
sam152 commentedHey @sime, just to clarify, when you say "in draft mode", do you mean when the parent content is being drafted, or do you mean creating a draft version of the whole entity hierarchy and then publishing that once it's ready?
Comment #6
sam152 commentedPutting aside #4 and #5 and purely looking at the steps in the issue summary, you can choose to load the default revision in that reorder form, which does indeed grant you access to reorder the tree, while creating a draft.
I'm not sure if this impacts other areas of EH, but conceptually I guess it would be modifying the "live" version of the tree, like @larowlan mentioned in #2. I'm unsure what users expectations are at that stage, considering they are mid-way through a draft or if "leaking" into the live version is useful or not.
Seeing what the bot says.
Comment #7
sam152 commentedJust trying to clarify my own understanding of the module and the problem space (please correct me if I'm wrong):
I do wonder if given this information, it's conceptually possible to "draft" tree reorder changes and have that be independent of child content changes, without a massive amount of complexity. I do wonder if storing the tree information in a field is going to afford this level of flexibility.
Conceptually, maybe a "reorder" operation needs to direct users into the child entity form to make changes. From there, they are already presented with options around drafts and publishing, so decisions about when things are reflected in the live version would be more explicit.
This does introduce a massive limitation, that reordering and reparenting are stuck and bound to content changes that might be occurring at the same time. This is unsolved in core and was once in scope for the workflow initiative. The issue tracking such revision semantics is: #3023194: [PP-2] Add parallel revisioning support:
In this case the "typo" that the parent entity wants to fix up is the weight of the child.
Comment #8
sime> Hey @sime, just to clarify, when you say "in draft mode", do you mean when the parent content is being drafted
In this specific issue it's just the parent that is in draft.
> you can choose to load the default revision in that reorder form.
I'm not sure how to do that. is there a route like /node/20/children/vid/12345?
I'm a bit confused because following the steps in the OP, I can't find any way to order the existing children of any revision if there is a draft - node/20/chilren just shows empty. A lot of your comments Sam suggest that it's a nuanced thing, but I think if there was only one version of the children that might be fine - but I can't apparently interact with it at all if there is a new draft.
> Conceptually, maybe a "reorder" operation needs to direct users into the child entity form to make changes. From there, they are already presented with options around drafts and publishing, ...
I understand the complexity but I didn't realise this issue went so deep :D
Comment #9
simeOh i missed that there is a patch. Trying it.
Comment #10
simeThe patch fixes the immediate problem for us! I'm going to add an editor message saying "This order applies to the current version of the page (which is usually the published version), you can't control the order for draft versions".
Do you want us to write a test?
Comment #11
simeComment #13
larowlanThanks, rolling 8.x-2.25