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

IBX-8800: Fixed subitems filtering #1328

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Conversation

ciastektk
Copy link
Contributor

@ciastektk ciastektk commented Aug 21, 2024

🎫 Issue IBX-8800

Description:

Currently LogicalAnd criterion is always added to query via ContentTreeChildrenQueryArgumentResolver and ContentTreeController::loadChildrenAction. When using solr or elasticserach engine and filter parameter is not passed to request, exception about Invalid aggregation in LogicalAnd criterion is throw.

This PR changes type hint of $filter parameter from Criterion to ?Criterion in ContentTreeController::loadChildrenAction. This allows to yield null value in ContentTreeChildrenQueryArgumentResolver::resolve when processed array of filter criteria is empty.

For QA:

Documentation:

@ciastektk ciastektk added Bug Something isn't working Ready for review labels Aug 21, 2024
@ciastektk ciastektk requested a review from a team August 21, 2024 12:17
@ciastektk ciastektk requested review from Steveb-p and a team August 22, 2024 05:56
@konradoboza konradoboza requested a review from a team August 22, 2024 06:10
@ciastektk ciastektk force-pushed the ibx-8800-fixed-subitems-filtering branch 2 times, most recently from ff28fa7 to e5d1789 Compare August 23, 2024 11:03
@ciastektk ciastektk requested review from Steveb-p and a team August 23, 2024 11:33
@ciastektk ciastektk force-pushed the ibx-8800-fixed-subitems-filtering branch from e5d1789 to e143783 Compare August 26, 2024 12:04
@ciastektk ciastektk requested review from a team and Steveb-p August 26, 2024 12:05
@Steveb-p Steveb-p requested a review from a team August 26, 2024 12:07
Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming this is internal code: +1

@alongosz alongosz requested a review from a team August 26, 2024 12:21
@ciastektk ciastektk force-pushed the ibx-8800-fixed-subitems-filtering branch from f95a231 to bc132ba Compare August 30, 2024 07:10
Copy link

sonarcloud bot commented Aug 30, 2024

Copy link
Contributor

@bogusez bogusez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested using Elastic, Solr and Legacy search engines

@ciastektk ciastektk merged commit 1f87fe4 into 4.6 Aug 30, 2024
28 checks passed
@ciastektk ciastektk deleted the ibx-8800-fixed-subitems-filtering branch August 30, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working QA approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants