leissbua
leissbua
I like it, make me a reviewer and i approve it.
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:  You again apply same kind of filter to: app/code/core/Mage/CatalogSearch/Model/Layer.php  This is colliding with app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php:  As it is trying (not very smart)...
This is happening in the latest release and all previous releases i checked (19.4.21): [](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.