- Status changed to Fixed
about 2 years ago 2:07am 18 January 2023 Automatically closed - issue fixed for 2 weeks with no activity.
This entity node cannot be referenced as it is either a child or the same entity.
Setup a simple workflow with Draft, Needs Review, Published, Archived.
In Basic page node type enable "Create new revision" in publishing option and add field_parent as an Entity reference hierarchy field.
Step 1. Create 'Page Test' then save daft.
Step 2. Create 'Page Test 1' and in field_parent select 'Page Test' then save daft.
Step 3. Create 'Page Test 2' and in field_parent select 'Page Test' then save daft.
Step 4. Edit 'Page Test 2' and in field_parent remove 'Page Test' then save draft.
Step 5. Edit 'Page Test' and in field_parent select 'Page Test 2' then try to save the node => The error show up in field_parent field with message "This entity node cannot be referenced as it is either a child or the same entity."
We may need to update validate method in ValidHierarchyReferenceConstraintValidator to exclude non default revisions of children.
Same what we did with loadEntitiesForTreeNodesWithoutAccessChecks in EntityTreeNodeMapper.
Fixed
3.0
Code (module)
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Automatically closed - issue fixed for 2 weeks with no activity.