Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node:repair removeDisallowedChildNodes removes allowed nodes #2287

Open
kdambekalns opened this issue Nov 23, 2018 · 1 comment
Open

node:repair removeDisallowedChildNodes removes allowed nodes #2287

kdambekalns opened this issue Nov 23, 2018 · 1 comment

Comments

@kdambekalns
Copy link
Member

Description

When variants of a node differ in type, and thus some variants allow children while other don't allow them, allowed nodes will be removed.

Steps to Reproduce

  1. Have variants of the same node, one being a document (with a "main" content collection) and one being a shortcut
  2. Call ./flow node:repair --only removeDisallowedChildNodes

Expected behavior

Existing disallowed children of the shortcut are removed, other's left in place

Actual behavior

Even the children of the document nodes are removed

Affected Versions

Neos: probably all supported versions…

@kdambekalns
Copy link
Member Author

As far as I can tell, the cause is that removeDisallowedChildNodes calls removeNodeAndChildNodesInWorkspaceByPath - and that will remove all the nodes, since they have the same path. The (potentially differing) type is no longer taken into account…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant