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

Site crash when I delete a store view
 
ceiboss
Jr. Member
 
Total Posts:  15
Joined:  2008-09-10
 

I created a really nice site and was about ready to turn it live.  I wanted to delete an old store view before I did that.  I went through the admin panel and removed it.  As soon as I did I got the error below.  Now I can’t access anything.  I really don’t want to put this whole thing back together again.  It says it’s recoverable, but I have no idea how.  Please help!

Thanks,

Scott

Error follows:

Recoverable Error: Argument 1 passed to Mage_Core_Model_Store::setGroup() must be an instance of Mage_Core_Model_Store_Group, null given, called in /var/www/domains/x.copelandcommunications.com/docs/cart/app/code/core/Mage/Core/Model/App.php on line 351 and defined in /var/www/domains/x.copelandcommunications.com/docs/cart/app/code/core/Mage/Core/Model/Store.php on line 627
Trace:
#0 /var/www/domains/x.copelandcommunications.com/docs/cart/app/code/core/Mage/Core/Model/Store.php(627): mageCoreErrorHandler(4096, ‘Argument 1 pass...’, ‘/var/www/domain...’, 627, Array)
#1 /var/www/domains/x.copelandcommunications.com/docs/cart/app/code/core/Mage/Core/Model/App.php(351): Mage_Core_Model_Store->setGroup(NULL)
#2 /var/www/domains/x.copelandcommunications.com/docs/cart/app/code/core/Mage/Core/Model/App.php(211): Mage_Core_Model_App->_initStores()
#3 /var/www/domains/x.copelandcommunications.com/docs/cart/app/Mage.php(404): Mage_Core_Model_App->init(’’, ‘store’, Array)
#4 /var/www/domains/x.copelandcommunications.com/docs/cart/app/Mage.php(423): Mage::app(’’, ‘store’, Array)
#5 /var/www/domains/x.copelandcommunications.com/docs/cart/index.php(40): Mage::run()
#6 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
redpen
Sr. Member
 
Total Posts:  254
Joined:  2008-01-23
 

Don’t panic.

Although I don’t have the answer right now, I have seen this before.  Chances are it’s just a simple edit to the raw database via PHPMyAdmin - you might need to adjust the default store view in the database but it’s certainly recoverable.

Hopefully someone will assist soon.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ceiboss
Jr. Member
 
Total Posts:  15
Joined:  2008-09-10
 

Thanks.  I feel some better.  I’ve been digging around the database looking for the solution, but it hasn’t popped out at me yet.  I’m not a database person anyway, so I’m kind of looking blind.  Thanks for the help.  If you or someone finds where I should look, please let me know.

Thanks,

Scott

 
Magento Community Magento Community
Magento Community
Magento Community
 
ceiboss
Jr. Member
 
Total Posts:  15
Joined:  2008-09-10
 

I’m looking at

core_store_group

under that group I have 3 items.  The first one was created when I installed the store and I’d like to lose that one.  The other two are my stores.

Group ID Website ID Name root_catagory_id default_store_id
Default 0 0 Default 0 0
CCI 2 1 CCI 2 2
CEI 3 1 CEI 2 3

Can I just delete Default?  At the minimum I’d like the Default to point to the CCI store.

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
coochy
Member
 
Total Posts:  69
Joined:  2009-01-20
 

Hi Ceiboss, did you manage to solve that issue and how?
Many thanks to you, I’ve the same issue & I’m lost....

Claude

 
Magento Community Magento Community
Magento Community
Magento Community
 
Roy Andre
Sr. Member
 
Avatar
Total Posts:  209
Joined:  2007-08-31
 

Make sure your core_store_group contains something like this:

group_id website_id name root_category_id default_store_id
0 0 Default 0 0
1 1 Main Website Store 2 1

Its very easy to delete the Main Website Store, which causes the 404 you report. Varien should make sure its impossible to “404 the whole installation” like this, eventually by having a separate page where you can Revert such changes.

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