0

I have deleted the 2nd Magento website and after deleting the 2nd website showing the following error please help me. how to resolve this issue

{"0":"The website with id 2 that was requested wasn't found. Verify the website and try again.","1":"#1 Magento\Store\Model\StoreManager->getWebsite(2) called at [generated/code/Magento/Store/Model/StoreManagerInterface/Proxy.php:135]\n#2 Magento\Store\Model\StoreManagerInterface\Proxy->getWebsite(2) called at [vendor/magento/module-store/Model/Resolver/Website.php:31]\n#3 Magento\Store\Model\Resolver\Website->getScope(2) called at [vendor/magento/framework/App/Config/ScopeCodeResolver.php:49]\n#4 Magento\Framework\App\Config\ScopeCodeResolver->resolve('website', 2) called at [vendor/magento/module-config/App/Config/Source/RuntimeConfigSource.php:100]\n#5 Magento\Config\App\Config\Source\RuntimeConfigSource->loadConfig() called at [vendor/magento/module-config/App/Config/Source/RuntimeConfigSource.php:72]\n#6 Magento\Config\App\Config\Source\RuntimeConfigSource->get('') called at [vendor/magento/framework/App/Config/ConfigSourceAggregated.php:40]\n#7 Magento\Framework\App\Config\ConfigSourceAggregated->get() called at [vendor/magento/module-config/App/Config/Type/System/Reader.php:60]\n#8 Magento\Config\App\Config\Type\System\Reader->read() called at [generated/code/Magento/Config/App/Config/Type/System/Reader/Proxy.php:95]\n#9 Magento\Config\App\Config\Type\System\Reader\Proxy->read() called at [vendor/magento/module-config/App/Config/Type/System.php:395]\n#10 Magento\Config\App\Config\Type\System->readData() called at [vendor/magento/framework/Cache/LockGuardedCacheLoader.php:103]\n#11 Magento\Framework\Cache\LockGuardedCacheLoader->lockedLoadData('SYSTEM_CONFIG', &Closure#000000004a020b5d00000000584c7219#, &Closure#000000004a020b5e00000000584c7219#, &Closure#000000004a020b5f00000000584c7219#) called at [vendor/magento/module-config/App/Config/Type/System.php:281]\n#12 Magento\Config\App\Config\Type\System->loadDefaultScopeData('default') called at [vendor/magento/module-config/App/Config/Type/System.php:207]\n#13 Magento\Config\App\Config\Type\System->getWithParts('default/admin/ur...') called at [vendor/magento/module-config/App/Config/Type/System.php:181]\n#14 Magento\Config\App\Config\Type\System->get('default/admin/ur...') called at [vendor/magento/framework/App/Config.php:132]\n#15 Magento\Framework\App\Config->get('system', 'default/admin/ur...') called at [vendor/magento/module-backend/App/Config.php:51]\n#16 Magento\Backend\App\Config->getValue('admin/url/use_cu...') called at [vendor/magento/module-backend/App/Area/FrontNameResolver.php:109]\n#17 Magento\Backend\App\Area\FrontNameResolver->getFrontName(false) called at [vendor/magento/module-backend/Helper/Data.php:209]\n#18 Magento\Backend\Helper\Data->getAreaFrontName(false) called at [generated/code/Magento/Backend/Helper/Data/Interceptor.php:128]\n#19 Magento\Backend\Helper\Data\Interceptor->getAreaFrontName() called at [app/code/Mageplaza/SeoUrl/App/Request/BackendPathInfoProcessor.php:71]\n#20 Mageplaza\SeoUrl\App\Request\BackendPathInfoProcessor->process(&Magento\Framework\App\Request\Http#000000004a020b2600000000584c7219#, '/vb_update_36361...') called at [generated/code/Magento/Backend/App/Request/PathInfoProcessor/Proxy.php:95]\n#21 Magento\Backend\App\Request\PathInfoProcessor\Proxy->process(&Magento\Framework\App\Request\Http#000000004a020b2600000000584c7219#, '/vb_update_36361...') called at [vendor/magento/framework/App/Request/Http.php:147]\n#22 Magento\Framework\App\Request\Http->getOriginalPathInfo() called at [vendor/magento/framework/App/Request/Http.php:162]\n#23 Magento\Framework\App\Request\Http->getPathInfo() called at [vendor/magento/framework/App/Request/Http.php:217]\n#24 Magento\Framework\App\Request\Http->getFrontName() called at [vendor/magento/framework/App/Http.php:111]\n#25 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]\n#26 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http#000000004a020b7500000000584c7219#) called at [index.php:39]\n","url":"/vb_update_36361990_admin/mpreports/dashboard/","script_name":"/index.php","report_id":"6ed5c8ee4c0cccfc43d62bc180c8e2543d88f8bc1a09e5656d4dd2fdaf68444c"}

3
  • How was the site deleted? Commented Nov 24, 2021 at 17:45
  • @Oscprofessionals I have 2 websites under 1 Magento installation and i have delete 2nd website
    – user129727
    Commented Nov 25, 2021 at 7:26
  • What was the URL requested. Was the browser cookies and cache cleared. Also was the server cache flushed and code deployed. any chance that code is in cache. Also check if there is any hardcoded store ID value or an entry of store id 2 left in some table and that didn't got deleted when store was deleted. Commented Nov 25, 2021 at 18:15

1 Answer 1

0

Based on the provided error trace, looks like some of the records in core_config_data table haven't been removed when you deleted the second website. So please try running the following MySQL query and then flush cache:

DELETE FROM `core_config_data` WHERE `scope` IN ('website', 'websites') AND `scope_id` = '2';
1
  • yes our issue is resolved thanks
    – user129727
    Commented Nov 26, 2021 at 17:55

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.