-
-
Notifications
You must be signed in to change notification settings - Fork 221
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] Fix parentsUntil operation #241
Conversation
Live test passed. Now it seems to work correctly. |
$until = $untilQuery->get(); | ||
} | ||
|
||
if (isset($until) && !empty($until)) { | ||
$until = end($until); |
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.
we also could rewrite end($until)
to $until[0]
in the faulty version (because that part caused the trouble in the first place). But i decided to take out the filter part completly (https://github.com/neos/neos-development-collection/pull/241/files#diff-da6eee0f189634f91c1b9d97abb888bcR69) and replace it by closest
on the first parent. What is the better option?
thanks @daniellienert! just pushed the commit with your suggestions |
Looks good to me. Do we have a test for this, otherwise a functional test woudl be nice to have. But as this clearly improves things we can merge it without... 👍 |
@kitsunet there is a functional test, but unfortunately it did not cover the latest bug. I fixed that also within this PR. |
Right, sorry, overlooked that. Great :) |
Looks solid and great to have a test covering that case |
[BUGFIX] Fix parentsUntil operation
Since the current parentsUntil operation does not return the correct parent nodes, this will fix the behaviour.
$until
did not return the first matched parent node.