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 database error when filtering in localized field in the object search #16689
Fix database error when filtering in localized field in the object search #16689
Conversation
Review Checklist
|
|
||
if ( | ||
$definitionExists | ||
&& !$class->getFieldDefinitions()['localizedfields']->getFieldDefinition($paramConditionObject['property']) |
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.
@saschabaecher-twocream Can you test it with a class that does not have a localized field?
I think there is no localizedfields array key and an exception will occur.
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.
Hello @blankse, thank you for your feedback!
If there are no localized fields in the class, an error occurs. I have now adjusted this.
Quality Gate passedIssues Measures |
@saschabaecher-twocream could you please fix PHPStan Static Analysis. |
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.
@saschabaecher-twocream There are still some errors in the static analysis. Could you please fix them. We unfortunately cannot merge this with broken tests.
Thanks in advance!
Quality Gate passedIssues Measures |
@saschabaecher-twocream I doesn't like the method_exists(). I create a alternative PR: |
@saschabaecher-twocream did you have a chance to check @blankse alternative PR? I checked it and would also prefer the alternative. |
Hi @mattamon, the alternative looks good too! Take the alternative. 👍 |
@saschabaecher-twocream thanks for being so casual about it! We still appreciate the work and effort you put into this PR and would be glad to get other PRs in the future! Have a great weekend! |
@saschabaecher-twocream I merged #16971 and it will be released with 11.2.4. Have a nice weekend! |
Situation:
Expected Behavior:
It should be possible to filter in the localized fields in the search as usual.
Fix:
In which we check whether this field is contained in the Localizedfields Field Definition.