baldwin-agency / magento2-module-url-data-integrity-checker

Magento 2 module which can find potential url related problems in your catalog data
MIT License
261 stars 28 forks source link

magento/framework exception on grids #16

Closed Morgy93 closed 3 years ago

Morgy93 commented 3 years ago

Hello,

on /baldwin_urldataintegritychecker/catalog_category_urlPath/ I'm getting the following error:

Call to undefined method Baldwin\UrlDataIntegrityChecker\Model\ResourceModel\Catalog\Category\UrlPathCollection\Interceptor::getSelect()
Exception in vendor/magento/framework/View/Element/UiComponent/DataProvider/FilterPool.php:45

All other grids are throwing the same exception.

Using version 1.2.0 of this module and Magento version 2.4.2 - maybe it is incompatible?

hostep commented 3 years ago

Hi @Morgy93

Indeed, I can reproduce this problem on a clean Magento 2.4.2 installation!

I've only tested this module on Magento 2.4.0 so far, not on 2.4.1 or 2.4.2, so something in those versions has changed which must have caused this problem.

I'll have a look later on for a way to solve this.

Thanks!

hostep commented 3 years ago

Magento 2.4.2 came with this change which starts causing this issue: https://github.com/magento/magento2/commit/2638e0ffae57f351c512e47a0295d4c2d376681a

This feels like a bug in Magento because a Collection isn't being forced to implement a getSelect() method.

And since we use the Collection to read from a json file and not from the database this might be difficult to implement.

Possible solutions:

This might take a while until fixed since I don't have that much free time, but I'll see what I can do 🙂

hostep commented 3 years ago

Is fixed in version 1.2.1 of this module.

I picked option 4 and introduced a silly workaround for the issue. The other options would be better for future improvements, but would take a lot longer to implement.

Also, we aren't the only ones who run into this problem with Magento 2.4.2, see: https://github.com/magento/magento2/issues/32292

Thanks for the report @Morgy93!