You might encounter the message Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website, null given when moving your store to another server.
The solution is straightforward. Run the following SQL queries to resolve the issue:
|
1 2 3 4 5 6 |
SET FOREIGN_KEY_CHECKS=0; UPDATE core_store_group SET group_id = 0 WHERE name = 'Default'; UPDATE core_store SET store_id = 0 WHERE code = 'admin'; UPDATE core_website SET website_id = 0 WHERE code = 'admin'; UPDATE customer_group SET customer_group_id = 0 WHERE customer_group_code = 'NOT LOGGED IN'; SET FOREIGN_KEY_CHECKS=1; |
Fixing the Mage_Core_Model_Store::setWebsite() argument type error
Need help implementing this solution, or still looking for a fix to your Magento problem? Get in touch and I will be happy to help with your project.