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

Nested rules bug #66

Open
ezstoritve opened this issue Oct 9, 2023 · 3 comments
Open

Nested rules bug #66

ezstoritve opened this issue Oct 9, 2023 · 3 comments
Assignees

Comments

@ezstoritve
Copy link

There is a bug in QueryBuilderParser class in line 82.

If you have nested rules makeQuery function is called before isNested. As nested rules have different array structure makeQuery cannot be processed - throws an error that field does not exists.

So, you have to check if rules are nested and call makeQuery if they are not.

Original:
$querybuilder = $this->makeQuery($querybuilder, $rule, $queryCondition); if ($this->isNested($rule)) { $querybuilder = $this->createNestedQuery($querybuilder, $rule, $queryCondition); }

Replace with:
if ($this->isNested($rule)) { $querybuilder = $this->createNestedQuery($querybuilder, $rule, $queryCondition); } else { $querybuilder = $this->makeQuery($querybuilder, $rule, $queryCondition); }

@timgws
Copy link
Owner

timgws commented Oct 15, 2023

Thanks for sending this in. I will check this out and patch if needed tomorrow.

@lingtalfi
Copy link

same issue here, the proposed fix seems to work just fine.

@itfixit
Copy link

itfixit commented Mar 4, 2024

Seems the issue is still not resolved. We cleared it in our fork for now. Is this project abandoned now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants