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

BUG: Publishing individual nodes is impossible when contents were created on a deleted document #4997

Open
grebaldi opened this issue Apr 18, 2024 · 0 comments

Comments

@grebaldi
Copy link
Contributor

Problem description

It is possible for editors to get trapped in an inescapably broken workspace state by trying to publish a change set that contains both the creation of a document node and the deletion of that same node.

Steps to reproduce:

  1. Create a document
  2. Create a content node on that document
  3. Delete the document
  4. Can't publish (via the UI)

The exception being thrown is: #1541678486: Node aggregate "..." does currently not exist. This happens during the handling of command CreateNodeAggregateWithNodeAndSerializedProperties.

If an attempt has been made to publish this change set via the UI, the workspace is now broken. It cannot be published, discarded or even rebased via the UI. The only escape-hatch is the CLI:

./flow workspace:discard --force [workspace-name]

If you only take the first 3 steps, it is possible to publish the changes via CLI:

./flow workspace:publish [workspace-name]

The problem is limited to PublishIndividualNodesFromWorkspace and DiscardIndividualNodesFromWorkspace.

Once the publishing attempt via the UI has been made, ./flow workspace:publish ceases to work as well.

Notes on solution

@kitsunet noted in Slack:

shouldn't these steps result in no changes?
given that you create the node(s) and delete them again?

Indeed, the ChangeProjection currently only flags the respective change records as both created and deleted. It should be possible to remove the change record instead, if it has been flagged as created and a deletion comes in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant