Skip to content

Store not found when adding a ? to site URL. #12450

@ghost

Description

Preconditions

  1. Magento 2.2.0
  2. PHP 7.0.25
  3. MariaDB 10.1.29

Steps to reproduce

  1. Turn on "Add storecode to URL's" in "Configuration > General > Web"
  2. Navigate in browser to "BASE_URL/?"
  3. Error thrown

Expected result

  1. With just a ? after the BASE_URL site should function normally

Actual result

  1. Store throws error.

Additional information

1 exception(s): Exception #0 (Magento\Framework\Exception\NoSuchEntityException): Requested store is not found Exception #0 (Magento\Framework\Exception\NoSuchEntityException): Requested store is not found #0 /Users/*/Development/*/vendor/magento/module-store/Model/StoreManager.php(168): Magento\Store\Model\StoreRepository->get('') #1 /Users/*/Development/*/generated/code/Magento/Store/Model/StoreManagerInterface/Proxy.php(119): Magento\Store\Model\StoreManager->getStore('') #2 /Users/*/Development/*/vendor/magento/module-store/Model/Resolver/Store.php(29): Magento\Store\Model\StoreManagerInterface\Proxy->getStore(NULL) #3 /Users/*/Development/*/vendor/magento/framework/App/Config/ScopeCodeResolver.php(49): Magento\Store\Model\Resolver\Store->getScope(NULL) #4 /Users/*/Development/*/vendor/magento/framework/App/Config.php(69): Magento\Framework\App\Config\ScopeCodeResolver->resolve('stores', NULL) #5 /Users/*/Development/*/vendor/magento/framework/App/MutableScopeConfig.php(36): Magento\Framework\App\Config->getValue('web/secure/base...', 'stores', NULL) #6 /Users/*/Development/*/vendor/magento/module-store/Model/Store.php(797): Magento\Framework\App\MutableScopeConfig->getValue('web/secure/base...', 'store') #7 /Users/*/Development/*/vendor/magento/module-store/Model/Store.php(601): Magento\Store\Model\Store->isCurrentlySecure() #8 /Users/*/Development/*/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Store\Model\Store->getBaseUrl() #9 /Users/*/Development/*/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Store\Model\Store\Interceptor->___callParent('getBaseUrl', Array) #10 /Users/*/Development/*/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Store\Model\Store\Interceptor->Magento\Framework\Interception\{closure}() #11 /Users/*/Development/*/generated/code/Magento/Store/Model/Store/Interceptor.php(26): Magento\Store\Model\Store\Interceptor->___callPlugins('getBaseUrl', Array, Array) #12 /Users/*/Development/*/vendor/magento/module-store/Model/Store.php(1299): Magento\Store\Model\Store\Interceptor->getBaseUrl() #13 /Users/*/Development/*/vendor/magento/module-store/Model/StoreCookieManager.php(59): Magento\Store\Model\Store->getStorePath() #14 /Users/*/Development/*/vendor/magento/module-store/Model/Plugin/StoreCookie.php(90): Magento\Store\Model\StoreCookieManager->setStoreCookie(Object(Magento\Store\Model\Store\Interceptor)) #15 /Users/*/Development/*/vendor/magento/framework/Interception/Interceptor.php(121): Magento\Store\Model\Plugin\StoreCookie->beforeDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Magento\Framework\App\Request\Http)) #16 /Users/*/Development/*/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http)) #17 /Users/*/Development/*/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #18 /Users/*/Development/*/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http)) #19 /Users/*/Development/*/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array) #20 /Users/*/Development/*/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #21 /Users/*/Development/*/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Http->launch() #22 /Users/*/Development/*/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\Http\Interceptor->___callParent('launch', Array) #23 /Users/*/Development/*/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}() #24 /Users/*/Development/*/generated/code/Magento/Framework/App/Http/Interceptor.php(26): Magento\Framework\App\Http\Interceptor->___callPlugins('launch', Array, Array) #25 /Users/*/Development/*/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch() #26 /Users/*/Development/*/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor)) #27 /Users/*/.composer/vendor/weprovide/valet-plus/server.php(113): require('/Users/*/De...') #28 {main}

Metadata

Metadata

Assignees

Labels

Fixed in 2.2.xThe issue has been fixed in 2.2 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions