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

[BUGFIX] Fix parentsUntil operation #241

Merged
merged 7 commits into from
Dec 10, 2015

Conversation

gerhard-boden
Copy link
Contributor

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.

@jonnitto
Copy link
Member

jonnitto commented Dec 6, 2015

Live test passed. Now it seems to work correctly.

$until = $untilQuery->get();
}

if (isset($until) && !empty($until)) {
$until = end($until);
Copy link
Contributor Author

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 closeston the first parent. What is the better option?

@gerhard-boden
Copy link
Contributor Author

thanks @daniellienert! just pushed the commit with your suggestions

@kitsunet
Copy link
Member

kitsunet commented Dec 8, 2015

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... 👍

@gerhard-boden
Copy link
Contributor Author

@kitsunet there is a functional test, but unfortunately it did not cover the latest bug. I fixed that also within this PR.

@kitsunet
Copy link
Member

kitsunet commented Dec 8, 2015

Right, sorry, overlooked that. Great :)

@hlubek
Copy link
Contributor

hlubek commented Dec 10, 2015

Looks solid and great to have a test covering that case

hlubek added a commit that referenced this pull request Dec 10, 2015
@hlubek hlubek merged commit c2efdea into neos:2.0 Dec 10, 2015
@gerhard-boden gerhard-boden deleted the parentsuntilbugfix branch December 10, 2015 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants