0

I deleted a lite version of a template and I guess it broke me being able to login to back end. This is from the log files.

a:5:{i:0;s:29:"Invalid website id requested.";i:1;s:3693:"#0 /home/fsuappar/public_html/app/code/core/Mage/Core/Model/App.php(950): Mage::exception('Mage_Core', 'Invalid website...')
#1 /home/fsuappar/public_html/app/code/core/Mage/Core/Model/Store.php(465): Mage_Core_Model_App->getWebsite('2')
#2 /home/fsuappar/public_html/app/code/core/Mage/Tax/Block/Adminhtml/Notifications.php(150): Mage_Core_Model_Store->getWebsite()
#3 /home/fsuappar/public_html/app/design/adminhtml/default/default/template/tax/notifications.phtml(31): Mage_Tax_Block_Adminhtml_Notifications->getWebsitesWithWrongDiscountSettings()
#4 /home/fsuappar/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/fsuappar/...')
#5 /home/fsuappar/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#6 /home/fsuappar/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#7 /home/fsuappar/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#8 /home/fsuappar/public_html/app/code/core/Mage/Tax/Block/Adminhtml/Notifications.php(196): Mage_Adminhtml_Block_Template->_toHtml()
#9 /home/fsuappar/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Tax_Block_Adminhtml_Notifications->_toHtml()
#10 /home/fsuappar/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#11 /home/fsuappar/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#12 /home/fsuappar/public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#13 /home/fsuappar/public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('notifications', true)
#14 /home/fsuappar/public_html/app/design/adminhtml/default/default/template/page.phtml(55): Mage_Core_Block_Abstract->getChildHtml('notifications')
#15 /home/fsuappar/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/fsuappar/...')
#16 /home/fsuappar/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#17 /home/fsuappar/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#18 /home/fsuappar/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#19 /home/fsuappar/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#20 /home/fsuappar/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#21 /home/fsuappar/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#22 /home/fsuappar/public_html/app/code/core/Mage/Adminhtml/controllers/DashboardController.php(43): Mage_Core_Controller_Varien_Action->renderLayout()
#23 /home/fsuappar/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_DashboardController->indexAction()
#24 /home/fsuappar/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#25 /home/fsuappar/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#26 /home/fsuappar/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#27 /home/fsuappar/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#28 /home/fsuappar/public_html/index.php(87): Mage::run('', 'store')
#29 {main}";s:3:"url";s:70:"/index.php/admin/dashboard/index/key/fa914172cb92773d9b71ec807bda2c9b/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}
2
  • Also the front of the site loads Perfectly.
    – user9270
    Jun 17, 2014 at 18:08
  • Can you better explain "I deleted a lite version of a template"?
    – benmarks
    Jun 17, 2014 at 19:01

5 Answers 5

5

It seems like the error posted is throwing an Invalid website id requested error, which is typically caused by deleting stores or content staging websites. To clean up these errors in the past, I have followed these steps:

Make sure that these tables only reference valid websites/stores by deleting records that reference deleted stores and websites:

  • core_store
  • core_store_group
  • core_website

In the catalog_product_website table, make sure that products are only associated with active websites. For example, to delete associations between all websites except website id 1, use the following SQL: DELETE FROM catalog_product_website WHERE website_id != 1

At this point, the Magento Admin should be accessible and functional.

1

Just suffered the same calamity two days ago. My case was quickly resolved by re-uploading the ENTIRE template file set via FTP to your server.

After the upload completes try logging back in.

Most likely you have deleted a necessary file by mistake.

1
  • Did not work for me :(
    – user9270
    Jun 17, 2014 at 19:54
1

The website '2' seems to be invalid. Try to see in core_website table how many websites are configured, and check which website Magento is trying to load by the id 2.

1

If deleting all references to the missing store from the tables @ScottYoumans suggested does not work, as in my case: I readded the website via SQL directly into core_wesite with an id matching the previously deleted website. This allowed me to regain access to the Admin Panel, since the Error was gone and allowed me to try deleting the Website again. This worked for me on the second attempt.

0

I received the "Invalid website id requested" error when deleting a 'Store' I created in Magento.

I solved this problem by opening up the following tables in phpmyadmin:

  • core_store
  • sore_store_group

And deleting the records in those tables that still had records of the deleted store.

When I did this, the error went away, and allowed me to login to the admin panel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.