Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Recoverable Error: Argument 1 passed to Mage_Core_Model_Store_Group::setWebsite()
 
Dotson
Jr. Member
 
Total Posts:  5
Joined:  2008-08-08
 

Hello,

I installed Magento 1.1.2 for the first time today. It installed perfectly and started to explore golden Magento fields. I added catalogue and added few products. By the way, when updating the product I got an error something like Notice: Year (path to zend date.php) on line xxxx.  I posted this already to another place. Link

After adding some products and watching them through ftontpage I got an error:

Recoverable Error: Argument 1 passed to Mage_Core_Model_Store_Group::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in F:\wamp\www\magento\app\code\core\Mage\Core\Model\App.php on line 393 and defined in F:\wamp\www\magento\app\code\core\Mage\Core\Model\Store\Group.php on line 204
Trace:
#0 F:\wamp\www\magento\app\code\core\Mage\Core\Model\Store\Group.php(204): mageCoreErrorHandler(4096, ‘Argument 1 pass...’, ‘F:\wamp\www\mag...’, 204, Array)
#1 F:\wamp\www\magento\app\code\core\Mage\Core\Model\App.php(393): Mage_Core_Model_Store_Group->setWebsite(NULL)
#2 F:\wamp\www\magento\app\code\core\Mage\Core\Model\App.php(233): Mage_Core_Model_App->_initStores()
#3 F:\wamp\www\magento\app\Mage.php(397): Mage_Core_Model_App->init(’’, ‘store’, Array)
#4 F:\wamp\www\magento\app\Mage.php(416): Mage::app(’’, ‘store’, Array)
#5 F:\wamp\www\magento\index.php(46): Mage::run()
#6 {main}

This error is displayed everywhere. What ever I do I get this error both in backend and frontend.
I tried to empty whole database but still the error is there. Also, error displays even if I tried to run install.php again. Haven’t tried complete reinstall yet though.

Image Attachments
untitled.PNG
 
Magento Community Magento Community
Magento Community
Magento Community
 
cannedbrain
Jr. Member
 
Total Posts:  1
Joined:  2008-08-12
 

I also got this error. What I did (in the order I could remember):
1. Added a new root category named “store2” & created 2 new websites
2. Renamed the default category that came with fresh installation to “store1”
3. Added a subcategory to “store1”
4. Moved this subcategory to “store2”
5. Renamed the subcategory
6. Add another subcategory to “store2”

If I have to reinstall, is there any simpler way than deleting all, including the files. I honestly prefer simply dropping the database to start anew.

PS: I’m using v1.1.2 as well.

The error message:

Recoverable ErrorArgument 1 passed to Mage_Core_Model_Store_Group::setWebsite() must be an instance of Mage_Core_Model_Websitenull givencalled in /path/to/htdocs/app/code/core/Mage/Core/Model/App.php on line 393 and defined  in /path/to/htdocs/app/code/core/Mage/Core/Model/Store/Group.php on line 204
Trace
:
#0 /path/to/htdocs/app/code/core/Mage/Core/Model/Store/Group.php(204): mageCoreErrorHandler(4096, 'Argument 1 pass...', '/f1/content/mag...', 204, Array)
#1 /path/to/htdocs/app/code/core/Mage/Core/Model/App.php(393): Mage_Core_Model_Store_Group->setWebsite(NULL)
#2 /path/to/htdocs/app/code/core/Mage/Core/Model/App.php(233): Mage_Core_Model_App->_initStores()
#3 /path/to/htdocs/app/Mage.php(397): Mage_Core_Model_App->init('default', 'store', Array)
#4 /path/to/htdocs/app/Mage.php(416): Mage::app('default', 'store', Array)
#5 /path/to/htdocs/index.php(60): Mage::run('default')
#6 {main}
 
Magento Community Magento Community
Magento Community
Magento Community
 
andietheke
Member
 
Total Posts:  40
Joined:  2008-07-14
 

i got to this error after dumping a DB backup into the DB (just to test the worst case...). Is there no one out there who can say a word to this error? Ist 3 weeks old and kills everything. Reinstalling the COMPLETE shop and setting all properties back to the stand can’t be the best way

 
Magento Community Magento Community
Magento Community
Magento Community
 
piccaya
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2008-10-07
Brussels
 

Got the same issue, and I am struggling now recovering things for 9 am!!!! Only 3 hours to go.

Making a backup up and re-importing seems to be a bad idea ... well on my side ...

Any help on the case above?

piccaya

 
Magento Community Magento Community
Magento Community
Magento Community
 
Clear Clicks - Clear Success
Jr. Member
 
Avatar
Total Posts:  3
Joined:  2009-06-19
Berlin, Germany
 

Had the same problem after trying to reset the caches.

Deleting/renaming file

app/etc/use_cache.ser
fixed it for me.

(after long search on magentosite and finally finding this:

http://www.magentocommerce.com/wiki/groups/227/cache_is_not_writable

)
 
Magento Community Magento Community
Magento Community
Magento Community
 
chapagain
Sr. Member
 
Avatar
Total Posts:  202
Joined:  2009-07-19
 

Here is the complete solution for this problem :-

http://blog.chapagain.com.np/magento-recoverable-error-argument-1-passed-to-mage_core_model_store-setwebsite-must-be-an-instance-of-mage_core_model_website/

Hope this helps. Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Satcenter
Jr. Member
 
Total Posts:  6
Joined:  2009-02-04
 

still got the same error problem when i delete app/etc/use_cache.ser

Recoverable Error: Argument 1 passed to Mage_Core_Model_Store_Group::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in /home/boukees/domains/elektronicaspecialist.nl/public_html/app/code/core/Mage/Core/Model/App.php on line 447 and defined in /home/boukees/domains/elektronicaspecialist.nl/public_html/app/code/core/Mage/Core/Model/Store/Group.php on line 226
Trace:
#0 /home/boukees/domains/elektronicaspecialist.nl/public_html/app/code/core/Mage/Core/Model/Store/Group.php(226): mageCoreErrorHandler(4096, \’Argument 1 pass...\’, \’/home/boukees/d...\’, 226, Array)
#1 /home/boukees/domains/elektronicaspecialist.nl/public_html/app/code/core/Mage/Core/Model/App.php(447): Mage_Core_Model_Store_Group->setWebsite(NULL)
#2 /home/boukees/domains/elektronicaspecialist.nl/public_html/app/code/core/Mage/Core/Model/App.php(268): Mage_Core_Model_App->_initStores()
#3 /home/boukees/domains/elektronicaspecialist.nl/public_html/app/Mage.php(434): Mage_Core_Model_App->init(\’\’, \’store\’, Array)
#4 /home/boukees/domains/elektronicaspecialist.nl/public_html/app/Mage.php(455): Mage::app(\’\’, \’store\’, Array)
#5 /home/boukees/domains/elektronicaspecialist.nl/public_html/index.php(65): Mage::run()
#6 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
gavh
Jr. Member
 
Total Posts:  26
Joined:  2009-11-17
 

Try this in SQL

SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_storeSET store_id 0 WHERE code='admin';
UPDATE `core_store_groupSET group_id 0 WHERE name='Default';
UPDATE `core_websiteSET website_id 0 WHERE code='admin';
UPDATE `customer_groupSET customer_group_id 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;
 
Magento Community Magento Community
Magento Community
Magento Community
 
Nexus Rex
Sr. Member
 
Avatar
Total Posts:  139
Joined:  2008-07-10
Utah, USA
 
gavh - 30 March 2011 01:20 PM

Try this in SQL

SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_storeSET store_id 0 WHERE code='admin';
UPDATE `core_store_groupSET group_id 0 WHERE name='Default';
UPDATE `core_websiteSET website_id 0 WHERE code='admin';
UPDATE `customer_groupSET customer_group_id 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;

Thank you.

This worked perfectly for me while upgrading from 1.4.x to 1.5.x (specifically 1.4.1.1 to 1.5.1.0).

 
Magento Community Magento Community
Magento Community
Magento Community
 
mvmoore47
Jr. Member
 
Total Posts:  4
Joined:  2011-06-14
 

Hmmm. I don’t have the file app/etc/use_cache.ser
but the SQL in # 8 above worked like a charm!

Thanks for posting a solution.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bilaal
Jr. Member
 
Total Posts:  2
Joined:  2012-02-12
 

SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_storeSET store_id 0 WHERE code='admin';
UPDATE `core_store_groupSET group_id 0 WHERE name='Default';
UPDATE `core_websiteSET website_id 0 WHERE code='admin';
UPDATE `customer_groupSET customer_group_id 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;

Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
virbhadra
Jr. Member
 
Avatar
Total Posts:  11
Joined:  2011-09-13
 
gavh - 30 March 2011 01:20 PM

Try this in SQL

SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_storeSET store_id 0 WHERE code='admin';
UPDATE `core_store_groupSET group_id 0 WHERE name='Default';
UPDATE `core_websiteSET website_id 0 WHERE code='admin';
UPDATE `customer_groupSET customer_group_id 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;

Thanks This Work Perfectly

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top