0

I have used this guide to setup multiple websites, stores, and store views. As follows

Multiple websites, stores, and store views

enter image description here

Turned on "Add the store code to the base URL"

enter image description here

Set Base URLS

enter image description here

Everything works fine except that the default website should have been the US shown in the screenshot above, which has a website and store ID of 1.

Now to access the US site you need yo go to xyz.com/us instead of it showing as the base url itself xyz.com

Is there something I'm missing in this setup? Cause the default home page xyz.com is now showing the following error.

**

Magento\Framework\Exception\NoSuchEntityException: The store that was requested wasn't found. Verify the store and try again. in /home/xyz/m230.xyz.com/vendor/magento/module-store/Model/StoreRepository.php:75 Stack trace: #0 /home/xyz/m230.xyz.com/vendor/magento/module-store/Model/StoreManager.php(168): Magento\Store\Model\StoreRepository->get('') #1 /home/xyz/m230.xyz.com/generated/code/Magento/Store/Model/StoreManagerInterface/Proxy.php(119): Magento\Store\Model\StoreManager->getStore('') #2 /home/xyz/m230.xyz.com/vendor/magento/module-store/Model/Resolver/Store.php(30): Magento\Store\Model\StoreManagerInterface\Proxy->getStore(NULL) #3 /home/xyz/m230.xyz.com/vendor/magento/framework/App/Config/ScopeCodeResolver.php(49): Magento\Store\Model\Resolver\Store->getScope(NULL) #4 /home/xyz/m230.xyz.com/vendor/magento/framework/App/Config.php(69): Magento\Framework\App\Config\ScopeCodeResolver->resolve('stores', NULL) #5 /home/xyz/m230.xyz.com/vendor/magento/module-developer/Model/Logger/Handler/Debug.php(63): Magento\Framework\App\Config->getValue('dev/debug/debug...', 'stores')

6 /home/xyz/m230.xyz.com/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(31):

Magento\Developer\Model\Logger\Handler\Debug->isHandling(Array) #7 /home/xyz/m230.xyz.com/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\AbstractProcessingHandler->handle(Array) #8 /home/xyz/m230.xyz.com/vendor/magento/framework/Logger/Monolog.php(48): Monolog\Logger->addRecord(400, 'The store that ...', Array) #9 /home/xyz/m230.xyz.com/vendor/monolog/monolog/src/Monolog/Logger.php(707): Magento\Framework\Logger\Monolog->addRecord(400, 'The store that ...', Array) #10 /home/xyz/m230.xyz.com/vendor/magento/framework/App/Bootstrap.php(263): Monolog\Logger->error('The store that ...') #11 /home/xyz/m230.xyz.com/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))

12 {main}

**

4
  • Are you using mongo DB in your project ? What is the purpose ? Feb 7, 2019 at 6:08
  • I'm not using Mongo DB, I've setup a multi website/store and I want the default website to show correctly. Feb 7, 2019 at 6:10
  • please take a look at the store-views again. They naming and the codes are not as the standard expects them Feb 7, 2019 at 8:17
  • What is the standard? And where is it mentioned? I'm not sure that it is the cause of the problem. Feb 7, 2019 at 8:22

1 Answer 1

0

The error was being caused because of a extension conflict, disabling it, resolved the issue, the extension in question is Mageplaza Seo url (Mageplaza_SeoUrl) in case anyone else runs into this issue.

As for the default website, it switches/redirect to the US store when you click on a category, product or page link.

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.