Skip to content

Commit

Permalink
Skip store code admin from being detected in case of store code in ur…
Browse files Browse the repository at this point in the history
…l configured
  • Loading branch information
sylvainraye authored and mageprince committed Jul 28, 2018
1 parent f06f52c commit c5d85e0
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($storeCode);
$pathInfo = '/' . (isset($pathParts[1]) ? $pathParts[1] : '');
return $pathInfo;
Expand Down

0 comments on commit c5d85e0

Please sign in to comment.