1

I deleted an old website id that we have not used for the past year. However in doing so the customers that registered with this site can no longer login to the other websites associated with the account.

When we try to access the customer via the admin panel we get the following error:

a:5:{i:0;s:29:"Invalid website id requested.";i:1;s:2920:"#0 /home/socia641/public_html/app/code/core/Mage/Core/Model/App.php(969): Mage::exception('Mage_Core', 'Invalid website...')
#1 /home/socia641/public_html/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php(128): Mage_Core_Model_App->getWebsite('2')
#2 /home/socia641/public_html/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php(58): Mage_Adminhtml_Block_Customer_Edit_Tab_Account->initForm()
#3 /home/socia641/public_html/app/code/core/Mage/Core/Block/Abstract.php(918): Mage_Adminhtml_Block_Customer_Edit_Tabs->_beforeToHtml()
#4 /home/socia641/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#5 /home/socia641/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#6 /home/socia641/public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#7 /home/socia641/public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#8 /home/socia641/public_html/app/design/adminhtml/default/default/template/page.phtml(58): Mage_Core_Block_Abstract->getChildHtml('left')
#9 /home/socia641/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/socia641/...')
#10 /home/socia641/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#11 /home/socia641/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#12 /home/socia641/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#13 /home/socia641/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#14 /home/socia641/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#15 /home/socia641/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#16 /home/socia641/public_html/app/code/core/Mage/Adminhtml/controllers/CustomerController.php(151): Mage_Core_Controller_Varien_Action->renderLayout()
#17 /home/socia641/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_CustomerController->editAction()
#18 /home/socia641/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('edit')
#19 /home/socia641/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))
#20 /home/socia641/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#21 /home/socia641/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#22 /home/socia641/public_html/index.php(83): Mage::run('', 'store')
#23 {main}";s:3:"url";s:40:"/index.php/admin/customer/edit/id/14397/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

We are still able to search the customer email in manage customers we just cant access the account and they cant log into the site. In the website column it is blank compared to other customers. All other details seem normal. How do we fix this issue?

1 Answer 1

2

Export customer list, and change _website field to correct one for particular customer. And then import the list again

Make sure to take backup

5
  • thanks for the information, when I got to import what option do I select as when they import instead of editing the customer it is adding it as a new customer
    – Zacko
    Commented Aug 11, 2016 at 5:51
  • You can export any field. However you need to select Replace existing Complex Data when you Import. In order to update the web site update _website field for your new customer. normally "base" is default website. Use System -> Store Manager to find our your current default store. Commented Aug 11, 2016 at 23:02
  • I have exported the data and changed the customers to the other store & website values. I select Replace existing Complex Data when I import. However instead of changing the original customer account it just makes a new account?
    – Zacko
    Commented Aug 12, 2016 at 2:23
  • Fixed issue by directly editing the website_id & store_id column values in the customer_entity table in the database. Thanks for your help on putting me on the right track!
    – Zacko
    Commented Aug 12, 2016 at 3:40
  • Awesome.. Easiest option is to edit CSV rather than going to DB Commented Aug 14, 2016 at 21:48

Your Answer

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

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