Skip to content

Commit ef6bada

Browse files
Merge forwardport of #11460 to 2.3-develop branch
Applied pull request patch https://github.com/magento/magento2/pull/11460.patch (created by @diglin) based on commit(s): 1. ac0406c 2. 6ebf3ce Fixed GitHub Issues in 2.3-develop branch: - #11140: Going to '/admin' while using storecodes in url and a different adminhtml url will throw exception (reported by @koenner01)
2 parents 47b1091 + f0af87e commit ef6bada

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($store->getCode());
4748
$pathInfo = '/' . (isset($pathParts[1]) ? $pathParts[1] : '');
4849
return $pathInfo;

0 commit comments

Comments
 (0)