"No such entity" error

Migration ended at 100%, but just after migration there is any error (before required steps to complete migration). 
 
CLI                                            

  [Magento\Framework\Exception\NoSuchEntityException]  
  No such entity.  

 
Website:

Magento\Framework\Exception\NoSuchEntityException: No such entity. in /home/admin/domains/mysite/public_html/vendor/magento/module-store/Model/WebsiteRepository.php:102 Stack trace: #0 /home/admin/domains/mysite/public_html/vendor/magento/module-store/Model/StoreManager.php(204): Magento\Store\Model\WebsiteRepository->getById(‘2’) #1 /home/admin/domains/mysite/public_html/generated/code/Magento/Store/Model/StoreManagerInterface/Proxy.php(135): Magento\Store\Model\StoreManager->getWebsite(‘2’) #2 /home/admin/domains/mysite/public_html/vendor/magento/module-store/Model/Resolver/Website.php(30): Magento\Store\Model\StoreManagerInterface\Proxy->getWebsite(‘2’) #3 /home/admin/domains/mysite/public_html/vendor/magento/framework/App/Config/ScopeCodeResolver.php(49): Magento\Store\Model\Resolver\Website->getScope(‘2’) #4 /home/admin/domains/mysite/public_html/vendor/magento/module-config/App/Config/Source/RuntimeConfigSource.php(86): Magento\Framework\App\Config\ScopeCodeResolver->resolve(‘websites’, ‘2’) #5 /home/admin/domains/mysite/public_html/vendor/magento/module-config/App/Config/Source/RuntimeConfigSource.php(62): Magento\Config\App\Config\Source\RuntimeConfigSource->loadConfig() #6 /home/admin/domains/mysite/public_html/vendor/magento/framework/App/Config/ConfigSourceAggregated.php(40): Magento\Config\App\Config\Source\RuntimeConfigSource->get(”) #7 /home/admin/domains/mysite/public_html/vendor/magento/module-config/App/Config/Type/System/Reader.php(60): Magento\Framework\App\Config\ConfigSourceAggregated->get() #8 /home/admin/domains/mysite/public_html/generated/code/Magento/Config/App/Config/Type/System/Reader/Proxy.php(95): Magento\Config\App\Config\Type\System\Reader->read() #9 /home/admin/domains/mysite/public_html/vendor/magento/module-config/App/Config/Type/System.php(292): Magento\Config\App\Config\Type\System\Reader\Proxy->read() #10 /home/admin/domains/mysite/public_html/vendor/magento/module-config/App/Config/Type/System.php(191): Magento\Config\App\Config\Type\System->readData() #11 /home/admin/domains/mysite/public_html/vendor/magento/module-config/App/Config/Type/System.php(152): Magento\Config\App\Config\Type\System->loadDefaultScopeData(‘default’) #12 /home/admin/domains/mysite/public_html/vendor/magento/framework/App/Config.php(131): Magento\Config\App\Config\Type\System->get(‘default/web/sec…’) #13 /home/admin/domains/mysite/public_html/vendor/magento/framework/App/Config.php(80): Magento\Framework\App\Config->get(‘system’, ‘default/web/sec…’) #14 /home/admin/domains/mysite/public_html/vendor/magento/framework/App/Config.php(93): Magento\Framework\App\Config->getValue(‘web/secure/use_…’, ‘default’, NULL) #15 /home/admin/domains/mysite/public_html/vendor/magento/module-store/Model/HeaderProvider/Hsts.php(48): Magento\Framework\App\Config->isSetFlag(‘web/secure/use_…’) #16 /home/admin/domains/mysite/public_html/vendor/magento/framework/App/Response/HeaderManager.php(41): Magento\Store\Model\HeaderProvider\Hsts->canApply() #17 /home/admin/domains/mysite/public_html/vendor/magento/framework/Interception/Interceptor.php(121): Magento\Framework\App\Response\HeaderManager->beforeSendResponse(Object(Magento\Framework\App\Response\Http\Interceptor)) #18 /home/admin/domains/mysite/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Response\Http\Interceptor->Magento\Framework\Interception\{closure}() #19 /home/admin/domains/mysite/public_html/generated/code/Magento/Framework/App/Response/Http/Interceptor.php(117): Magento\Framework\App\Response\Http\Interceptor->___callPlugins(‘sendResponse’, Array, Array) #20 /home/admin/domains/mysite/public_html/vendor/magento/framework/App/Http.php(185): Magento\Framework\App\Response\Http\Interceptor->sendResponse() #21 /home/admin/domains/mysite/public_html/vendor/magento/framework/App/Http.php(156): Magento\Framework\App\Http->handleDeveloperMode(Object(Magento\Framework\App\Bootstrap), Object(Magento\Framework\Exception\NoSuchEntityException)) #22 /home/admin/domains/mysite/public_html/vendor/magento/framework/App/Bootstrap.php(261): Magento\Framework\App\Http->catchException(Object(Magento\Framework\App\Bootstrap), Object(Magento\Framework\Exception\NoSuchEntityException)) #23 /home/admin/domains/mysite/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #24 {main}

 

7 answers

Profile photo of Mall Staff 184060.00 $tone January 6, 2018
Public

Hi there,
Do you see any records which has website_id = 2 in the table store_website in M2’s database now?
Seem in table core_config_data in M2’s database has some config records which belong to the scope websites with website_id = 2 but this website is not exists in table store_website now.
To solve that, you could try run SQL as followings:
UPDATE core_config_data SET scope_id = 0 WHERE scope = ‘websites’  AND scope_id = 2;
Once done, clean the Magento cache.
And tell me known how it goes then.
Regards,
Mall.

#1
Profile photo of rosemaria 120.00 $tone January 8, 2018
Public

I updated for scope = ‘stores’ too.
I changed scope ids to suitable website ids. Now it works.
 
Problem occurred when I restarted migration with some changes at webstores 

#2
Profile photo of Mall Staff 184060.00 $tone January 9, 2018
Public

Hi there,

I changed scope ids to suitable website ids. Now it works.

Yeah, let’s continue and contact me if you need further assistance.
Regards,
Mall.

#3
Profile photo of Ak Patel 40.00 $tone July 27, 2018
Public

Hello Friends,
I have Migrated website Magento 1.9.1.0 to Magento 2.2.4 successfully. My Old Magento Website was multi-store/website. Everything is working fine but when I am going to create an account then I am getting below errors
No such entity test with email = [email protected], websiteId = 1
I have tried to some fixes by running below command but this is already updated
SET FOREIGN_KEY_CHECKS=0;
UPDATE store SET store_id = 0 WHERE code=’admin’;
UPDATE store_group SET group_id = 0 WHERE name=’Default’;
UPDATE store_website SET website_id = 0 WHERE code=’admin’;
UPDATE customer_group SET customer_group_id = 0 WHERE customer_group_code=’NOT LOGGED IN’;
SET FOREIGN_KEY_CHECKS=1;
I have a lot of research but nothing found to resolve this issue. Please help me.
 
 

#4
Profile photo of Mall Staff 184060.00 $tone July 27, 2018
Public

Hi Ak Patel,

but when I am going to create an account then I am getting below errors
No such entity test with email = [email protected], websiteId = 1

I need a closer look to detect the root of the issue you mentioned. Let’s provide me information about your instance:
+ Admin credentials and URL to back-end
+ SSH credentials and path to Magento2 folder
+ phpMyadmin credentials to control your databases
I will help to check further and reply you more later.
Regards,
Mall.

#5
Profile photo of ubdev Staff 98590.00 $tone July 27, 2018
Public

Hi Ak Patel,
We’re sorry for not asking the migration tool you were using. 
We can provide technical support for issues related to our UB Data Migration Pro only. 
 
Thanks for your understanding. 
Sincerely,
Ubertheme team

#7

Please login or Register to Submit Answer

Written By

Comments