(DomainException): Default website is not defined

Hi,
Migrating from magento 1.9.x to Magento 2.1.3 using UB Data Migration Pro — 3.0.4 using ssh command.
Migration shows 100% completed. This migration was done on a clean Magento 2.1.3 as I wanted to migrate data first before theme customisation.
Now I am getting an error below after migration. Flushed cache, clean and also reindexing wont work.Are you able to guide us.
Are you able to guide us what the reason could be.
Log details are below.
Best regards,
Suraj
1 exception(s):
Exception #0 (DomainException): Default website is not defined
Exception #0 (DomainException): Default website is not defined
#0 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/vendor/magento/module-store/Model/StoreResolver/Website.php(46): Magento\Store\Model\WebsiteRepository->getDefault()
#1 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/vendor/magento/module-store/Model/StoreResolver.php(136): Magento\Store\Model\StoreResolver\Website->getAllowedStoreIds(NULL)
#2 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/vendor/magento/module-store/Model/StoreResolver.php(122): Magento\Store\Model\StoreResolver->readStoresData()
#3 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/vendor/magento/module-store/Model/StoreResolver.php(85): Magento\Store\Model\StoreResolver->getStoresData()
#4 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/vendor/magento/module-store/Model/StoreManager.php(154): Magento\Store\Model\StoreResolver->getCurrentStoreId()
#5 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/var/generation/Magento/Store/Model/StoreManagerInterface/Proxy.php(119): Magento\Store\Model\StoreManager->getStore(NULL)
#6 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/vendor/magento/module-store/Model/Resolver/Store.php(29): Magento\Store\Model\StoreManagerInterface\Proxy->getStore(NULL)
#7 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/vendor/magento/framework/App/Config/ScopeCodeResolver.php(49): Magento\Store\Model\Resolver\Store->getScope(NULL)
#8 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/vendor/magento/framework/App/Config.php(79): Magento\Framework\App\Config\ScopeCodeResolver->resolve(‘stores’, NULL)
#9 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/vendor/magento/module-backend/App/Area/FrontNameResolver.php(96): Magento\Framework\App\Config->getValue(‘admin/url/use_c…’, ‘stores’)
#10 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/vendor/magento/module-backend/App/Area/FrontNameResolver.php(79): Magento\Backend\App\Area\FrontNameResolver->isHostBackend()
#11 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/vendor/magento/framework/App/AreaList.php(73): Magento\Backend\App\Area\FrontNameResolver->getFrontName(true)
#12 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/vendor/magento/framework/App/Http.php(130): Magento\Framework\App\AreaList->getCodeByFrontName(‘controlpanel’)
#13 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#14 /var/www/vhosts/xxx.com.au/httpdocs/crystals-newage-shop/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#15 {main}

4 answers

Profile photo of Mall Staff 184060.00 $tone February 3, 2017
Public

Hi surajrai,

Exception #0 (DomainException): Default website is not defined

I don’t know why you got this issue. But to solve that, you have to set at least one Front-End Website is default website.
In your phpmyadmin, open the table store_website and manual edit at least one website to default (is_default = 1)
Regards,
Mall.
 

#1
Profile photo of surajrai -10.00 $tone February 3, 2017
Public

Hi Mall,
Dont know why or how it happened. But your solutions has fixed the issue.
Thank you very much for the great support. You do have a great product.
 
Best regards,
Suraj

#2

Please login or Register to Submit Answer

Written By

Comments