Skip to content

Commit 71c0f02

Browse files
committed
Fixed issue with getUrl cache and different store views
1 parent 3e9be1e commit 71c0f02

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Model/Url.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ public function getControllerName($route, $skip = true)
142142
*/
143143
public function getBaseUrl()
144144
{
145-
$url = $this->_url->getUrl($this->getBasePath());
145+
$url = $this->_url->getUrl($this->getBasePath(), [
146+
'_nosid' => $this->storeId ?: null
147+
]);
146148
$url = $this->trimSlash($url);
147149
return $url;
148150
}
@@ -156,9 +158,9 @@ public function getBaseUrl()
156158
public function getUrl($identifier, $controllerName)
157159
{
158160
$url = $this->_url->getUrl('', [
159-
'_direct' => $this->getUrlPath($identifier, $controllerName)
161+
'_direct' => $this->getUrlPath($identifier, $controllerName),
162+
'_nosid' => $this->storeId ?: null
160163
]);
161-
162164
return $url;
163165
}
164166

0 commit comments

Comments
 (0)