Skip to content

Commit

Permalink
Merge forwardport of #11460 to 2.3-develop branch
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
magento-engcom-team committed Jan 24, 2018
2 parents 47b1091 + f0af87e commit ef6bada
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/code/Magento/Store/App/Request/PathInfoProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
namespace Magento\Store\App\Request;

use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Store\Model\Store;

class PathInfoProcessor implements \Magento\Framework\App\Request\PathInfoProcessorInterface
{
Expand Down Expand Up @@ -42,7 +43,7 @@ public function process(\Magento\Framework\App\RequestInterface $request, $pathI
}

if ($store->isUseStoreInUrl()) {
if (!$request->isDirectAccessFrontendName($storeCode)) {
if (!$request->isDirectAccessFrontendName($storeCode) && $storeCode != Store::ADMIN_CODE ) {
$this->storeManager->setCurrentStore($store->getCode());
$pathInfo = '/' . (isset($pathParts[1]) ? $pathParts[1] : '');
return $pathInfo;
Expand Down

0 comments on commit ef6bada

Please sign in to comment.