-
-
Notifications
You must be signed in to change notification settings - Fork 223
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: Don’t copy removed nodes #5186
Conversation
d5687fd
to
0a8de51
Compare
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.
Tested. Works like charm. Thank you
]; | ||
if (!$isCopy) { | ||
$propertyNames[] = 'creationDateTime'; | ||
$propertyNames[] = 'lastModificationDateTime'; | ||
} | ||
if ($sourceNode instanceof NodeData) { | ||
$propertyNames[] = 'index'; | ||
$propertyNames[] = 'removed'; |
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.
I couldn't find a scenatio, where this change made a difference. But I guess it's fine to copy the property here too.
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.
The fact that this change to a central logic of our central domain object does not make any test fail leaves me startled.
Feel free to ignore my admonitory words, but maybe we should add a test to cover the new behavior at least?
Test woudl be great, I am also still straining my brain as to why we did copy them in the first place, wondering if there is/was a good reason, but I raelly cna't come up with anything, so this seems valid. |
With this change, removed nodes are not copied anymore in the recursive copy actions. Also the removed state is kept when a node is similarisied to prevent unpublished removed nodes from popping up again inadvertendly. Resolves: #5185
0a8de51
to
6936b7b
Compare
Added the test. Took me some time to get the test failing without the change, as |
@kitsunet @bwaidelich Can we merge it now, with the new added tests? |
Thanks for adding a test! Unfortunately that test does not fail for me if I revert the fix |
@Sebobo @dlubitz I tried to adjust the test, but I don't understand what's happening. And while trying to reproduce the issue I realized that I can't reproduce it with |
I don't know why and how, but this seems to be the "culprit": neos/neos-ui@2445c2a With:
I can reproduce the bug. Checkout out the previous commit:
..I can't. (not saying that this does not have to be fixed in the CR core, but I don't have all the information to +1/-1 this yet) |
You are right. I was not using latest Neos.Neos.UI while I was testing it. If I checkout latest version, the deleted nodes don't appear in the copy even without this change 🤔 . |
@dlubitz It seems like the change was only applied to 9.0.0-beta10 8.3.9 and 8.3.8 yet |
You only need one of the two changes. At first I did the nodedata change, and afterwards thought, why should removed nodes even be copied. |
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.
Thank you for digging into it. Looks good to me.
Jep, thanks for taking care. |
Seems like a legit question tbh there still is some confusion 😅 Luckily neos/neos-ui#3503 which is the pr containing said
So when running them in all combinations we get the following result concluding that the commit is still required.
error encountered in the tests: See you later alligator |
@mhsdesign so you are saying everything is fine now or not? 🤔 |
Yes sorry the conclusion from my tests is that this that based on the provided e2e tests that came with said commit i could not observe any undesired or obsolete behaviour. Everything seems fine as it is. |
With this change, removed nodes are not copied anymore in the recursive copy actions.
Also the removed state is now kept when a node is similarisied to prevent unpublished removed nodes from popping up again inadvertendly.
Resolves: #5185