Skip to content

Commit 390100c

Browse files
Generating target store post data with the right uenc
- By passing the target store in the _scope param urlBuilder generates the nice url rewrite for that target store. The BUG: - url is generated for the current store not target one if store id is not included in the url setting is set to no
1 parent af11309 commit 390100c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/UrlRewrite/Block/Plugin/Store/Switcher/SetRedirectUrl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function beforeGetTargetStorePostData(
6464
]);
6565
if ($urlRewrite) {
6666
$data[ActionInterface::PARAM_NAME_URL_ENCODED] = $this->urlHelper->getEncodedUrl(
67-
$this->trimSlashInPath($this->urlBuilder->getUrl($urlRewrite->getRequestPath()))
67+
$this->trimSlashInPath($this->urlBuilder->getUrl($urlRewrite->getRequestPath(), ['_scope' => $store]))
6868
);
6969
}
7070
return [$store, $data];

0 commit comments

Comments
 (0)