Skip to content

magento/magento2#32292: Fix FilterPool crash on non-AbstractDb collections - #41054

Open
swnsma wants to merge 1 commit into
magento:2.4-developfrom
swnsma:magento/magento2#32292
Open

magento/magento2#32292: Fix FilterPool crash on non-AbstractDb collections#41054
swnsma wants to merge 1 commit into
magento:2.4-developfrom
swnsma:magento/magento2#32292

Conversation

@swnsma

@swnsma swnsma commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Fixed Issues

  1. Fixes Custom admin UI component grid breaks when collection is not AbstractDb #32292 — Custom admin UI component grid breaks when collection is not AbstractDb

Manual testing scenarios

  1. Create or use an admin UI listing whose data provider collection extends Magento\Framework\Data\Collection only (not AbstractDb), registered on CollectionFactory.
  2. Open the admin grid (or call Reporting::search / mui/index/render for that namespace).
  3. Expected: grid loads without Call to undefined method ...::getSelect(); filters apply via addFieldToFilter.
  4. Regression: open a standard DB-backed grid (e.g. Customers) and apply multi-filter OR groups — results still match MC-24195 behavior.

Questions or comments

FilterPool::applyFilters() was rewritten in 2.4.2 (MC-24195 / 2638e0ff) to regroup SQL WHERE parts for correct OR-within-filter-group semantics. That path requires AbstractDb::getSelect(), but the method still type-hints base Collection.

This change:

  • Keeps the SQL regrouping path for AbstractDb collections
  • Restores the pre-2.4.2 applier-only loop for non-database collections
  • Adds unit tests for both paths and an integration test for non-AbstractDb collections (existing ReportingTest continues to cover DB OR groups)

Related: #33119 (Braintree Settlement duplicate of the same root cause).

@m2-assistant

m2-assistant Bot commented Jul 27, 2026

Copy link
Copy Markdown

Hi @swnsma. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.
❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

FilterPool::applyFilters always called getSelect() after MC-24195, which
fatals for UI grid collections that extend Framework Data\Collection only
(API-backed / in-memory grids). Keep SQL WHERE regrouping for AbstractDb
and restore the pre-2.4.2 applier-only path for other collections.

Adds unit and integration coverage for both paths.
@swnsma
swnsma force-pushed the magento/magento2#32292 branch from 13dea33 to e12b25e Compare July 27, 2026 09:20
@swnsma

swnsma commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

@magento run all tests

@engcom-Bravo engcom-Bravo added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Jul 27, 2026
@github-project-automation github-project-automation Bot moved this to Pending Review in Pull Requests Dashboard Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: pending review

Projects

Status: Pending Review

Development

Successfully merging this pull request may close these issues.

Custom admin UI component grid breaks when collection is not AbstractDb

2 participants