-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Fix query builder constraints #19114
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
Fix query builder constraints #19114
Conversation
…ivewire components Update QueryBuilder implementation to properly handle constraints
a1019c0 to
36ce05c
Compare
People-Sea
left a comment
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.
LGTM. This defensive fix addresses the issue.
The root cause is a state/schema cache synchronization issue, but this null check is a reasonable and low-risk solution.
|
I would like to understand the cause of the error before choosing to silence it like this, I'm confused why the synchronisation issue is there based on the issue description |
@danharrin From my debugging, it seems related to statePath switching in applyFiltersToTableQuery() causing cachedDefaultChildSchemas to be built from the wrong statePath. |
|
When getChildSchema($ruleIndex) is called with a non-default key (the rule index), and if there are no components registered for that key, the method returns null instead of returning an empty schema. This happens in the Builder component when iterating through rules. The $ruleBuilder->getChildSchema($ruleIndex) call expects to get a child schema for each item/rule, but when the $ruleIndex doesn't have cached child schemas yet, it returns null. |
|
I think #19128 addresses the root issue instead of silencing it I would appreciate @Umair-exe to check if it still solves their problem and @People-Sea to review if the code is sane or not - thanks for your comment about the child schema caching, that made it easy to trace the problem |
Description
Visual changes
Functional changes
composer cscommand.