Magento: Recoverable Error: Argument 1 passed to Mage_Core_Model_Store :: setWebsite() must be an instance of Mage_Core_Model_Website
Problem:
I was transfering Magento files and database from one server to another. I did complete all the transfer process of files and also exported and imported the database. After that, when I tried to access the site, I got the following error:-
Recoverable Error: Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in /path/app/code/core/Mage/Core/Model/App.php on line 427 and defined in /path/app/code/core/Mage/Core/Model/Store.php on line 279
Solution:
It’s very simple. Although I had to search for sometime for the solution. :)
Delete the following file:-
app/etc/use_cache.ser
That’s it. You are done. Now, you can access your site.
After doing this, you might get the next error which says:-
Notice: Undefined index: 0 in /srv/www/vhosts/javra.com/htdocs/munchad2/app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92
If you get this error then please have a look at the solution for this error over here:-
Hope this helps. Thanks.
Related posts:
- Magento: Solution to “Error: 404 Not Found” in Admin Login Page
- Magento Error – Notice: Undefined index: 0 app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92
- Magento: Fatal error: Call to a member function getTable() on a non-object
- Magento: Product Edit Warning: Invalid argument supplied for foreach()
- Configuration error on new Magento installation
- Magento Admin login problem
- PHP 5.3 & Magento Older Versions: How to use them together?
- PHP extension error while installing Magento
- jQuery: Grey out background and preview image as popup
- Magento: Helper Data not found error
