Home » Magento

Magento: Recoverable Error: Argument 1 passed to Mage_Core_Model_Store :: setWebsite() must be an instance of Mage_Core_Model_Website

17 August 2010 3,831 views Popularity: 8% Share/Bookmark

email

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:-

http://blog.chapagain.com.np/magento-error-%E2%80%93-notice-undefined-index-0-appcodecoremagecoremodelmysql4config-php-on-line-92/

Hope this helps. Thanks.

Related posts:

  1. Magento: Solution to “Error: 404 Not Found” in Admin Login Page
  2. Magento Error – Notice: Undefined index: 0 app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92
  3. Magento: Fatal error: Call to a member function getTable() on a non-object
  4. Magento: Product Edit Warning: Invalid argument supplied for foreach()
  5. Configuration error on new Magento installation
  6. Magento Admin login problem
  7. PHP 5.3 & Magento Older Versions: How to use them together?
  8. PHP extension error while installing Magento
  9. jQuery: Grey out background and preview image as popup
  10. Magento: Helper Data not found error
  • http://www.seriousinternetsystems.com/blueprintstoprofits/magento-templates-and-magento-extensions-can-work-wonders-for-online-stores/ Magento Templates And Magento Extensions Can Work Wonders For Online Stores :Blueprints To Profits

    [...] Magento: Recoverable Error: Argument 1 passed to … [...]

  • Sarath Tomy

    Magento redirect to old url after clearing the cache, add/edit/store, System>Configuration>Web . Then click save.Then also It redirects to old url. I checked the database, clear the var/ cache etc.. Now also.. Please help..