Skip to content

Commit 2d8b42a

Browse files
author
Oleksii Korshenko
authored
MAGETWO-81995: [ISSUE-11140][BUGFIX] Skip store code admin from being detected in ca… #11460
2 parents 8486408 + 0edab23 commit 2d8b42a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/Store/App/Request/PathInfoProcessor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Magento\Store\App\Request;
77

88
use Magento\Framework\Exception\NoSuchEntityException;
9+
use Magento\Store\Model\Store;
910

1011
class PathInfoProcessor implements \Magento\Framework\App\Request\PathInfoProcessorInterface
1112
{
@@ -42,7 +43,7 @@ public function process(\Magento\Framework\App\RequestInterface $request, $pathI
4243
}
4344

4445
if ($store->isUseStoreInUrl()) {
45-
if (!$request->isDirectAccessFrontendName($storeCode)) {
46+
if (!$request->isDirectAccessFrontendName($storeCode) && $storeCode != Store::ADMIN_CODE) {
4647
$this->storeManager->setCurrentStore($storeCode);
4748
$pathInfo = '/' . (isset($pathParts[1]) ? $pathParts[1] : '');
4849
return $pathInfo;

0 commit comments

Comments
 (0)