leissbua

Results 13 comments of leissbua

I guess i have to agree the ORM is to stupid so the dev choose to add the 1=1 before, so the AND does not become a problem. Need to...

But if this happens due to ORM stupidity, and the reported error is continuous, why not just prepend 1=1 to the where part array in general. I check whats going...

app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php is adding a status filter: ![image](https://user-images.githubusercontent.com/68073221/222366396-df8a9c0b-de6b-478e-89f3-9a59deab40e7.png) You again apply same kind of filter to: app/code/core/Mage/CatalogSearch/Model/Layer.php ![image](https://user-images.githubusercontent.com/68073221/222371791-6ff312aa-b56a-47a7-86bb-7c4147e863e3.png) This is colliding with app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php: ![image](https://user-images.githubusercontent.com/68073221/222371950-d5baf78a-99be-4fbe-a23b-f858b1c5c910.png) As it is trying (not very smart)...

This is happening in the latest release and all previous releases i checked (19.4.21): [![image](https://user-images.githubusercontent.com/68073221/222386708-17338df2-d1d5-4b03-9acc-ebb86a6f0dd3.png)](https://github.com/OpenMage/magento-lts/blob/v19.5.0-rc1/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php#L446) https://github.com/OpenMage/magento-lts/blob/v19.5.0-rc1/app/code/core/Mage/CatalogSearch/Model/Layer.php#L64 https://github.com/OpenMage/magento-lts/blob/v19.5.0-rc1/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php#L120

Enable flat catalog, do a search, get an invalid query. I think code speaks for itself, same reason you removed the additional status in-Filter in catalog.

It is valid, because there is no entity_id in condition: It replaces and that gives: ``` WHERE 1=1 AND 1=1 ``` If you have another condition like: ``` WHERE (e.status...

Ok, how do we want to handle the situation, from my pov this needs to be fixed / removed: https://github.com/OpenMage/magento-lts/blob/v19.5.0-rc1/app/code/core/Mage/CatalogSearch/Model/Layer.php#L64 https://github.com/OpenMage/magento-lts/blob/112f5a0d76ccb954160a4d6c08db209def27f34e/app/code/core/Mage/CatalogSearch/Model/Layer.php#L64-L66

I agree that the 1=1 is just stupid/dumb code and could be resolved. The case that e.status gets added twice is bad and additonally duplicates the entity_id in case as...

Please skip Loewenstark_UrlIndexer in favor of DnD_PatchIndexUrl, it has core quality and could directly be integrated. We use that since years for nearly every Magento1 project that we have.