Technical resource
OpenMage: Invalid attribute name: main_table.store_id
Note: This is a historical reference, not a current security baseline. Magento 1 is end-of-life.
The following exception is thrown on attempt to load catalog after migration/upgrade to OpenMage 19.4.3:
Invalid attribute name: main_table.store_id
Solution
Apply the very next commit after OpenMage v19.4.3 release:
$ git diff ef443a74..cf4c5a54
diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php
index 7244895..d50f071 100644
--- a/app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php
+++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php
@@ -381,7 +381,7 @@ class Mage_Catalog_Model_Resource_Category_Collection extends Mage_Catalog_Model
*/
public function addStoreFilter()
{
- $this->addFieldToFilter('main_table.store_id', $this->getStoreId());
+ $this->setProductStoreId($this->getStoreId());
return $this;
}
Source: https://github.com/OpenMage/magento-lts/issues/939