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
BUGFIX: Moving node back and forth in nested workspace causes SQL error #1640
Conversation
This change contains a Behat test which reproduces the bug described in issue neos#1639
This change fixes a problem in the content repository which can lead to a uniqueness constraint error when a node is moved back and forth in a nested workspace. Fixes neos#1639
The latest commit I pushed will fix the described bug and satisfies the Behat test which exposed the erroneous behavior. However, when you move a node, publish, move it back and publish again, the target workspace won't be empty, as you might expect. It will have all previously touched nodes as materialized nodes, but without any further content (property) changes. Technically, this is somewhat expected and correct, but ideally could be optimized as a separate feature. |
Okay, looks like Postgres doesn't like publishing nodes to the target workspace which already exist. Maybe we need to implement the optimize I mentioned. |
Ok, can confirm it fails, but …
For the Later (around line 6730 in mysql.txt) it becomes clear that PostgreSQL lacks a number of inserts and later updates, and in line 7227 (in mysql.txt) an obvious difference in checks for workspaces appears… |
This change splits up filterRemovedNodes() into two meaningful methods.
This change fixes the Behat test which exploits the given bug in neos#1640. But further checks and fixes might be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks for digging in :)
This change fixes further issues with moving nodes back and forth which occurred when moving nodes with sub structures. Also fixes the issue of leftover shadow nodes in the source workspace when such back-and-forth nodes were published. Extended the Behat test to check this scenario more thoroughly. Fixes neos#1639
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done.
I re-read the code tonight and (still) seems fine. IMHO should be merged. |
This change fixes a problem in the content repository which can lead to a uniqueness constraint error when a node is moved back and forth in a nested workspace.
Fixes #1639