Skip to content

Commit

Permalink
Merge branch 'stable' into fix/order_confirmation_not_changing_lang
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorrosusn authored Feb 14, 2024
2 parents 0234a95 + 0615212 commit 58c3dda
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
8 changes: 7 additions & 1 deletion meta/documents/changelog_de.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Release Notes für IO

## v5.0.62 (xxxx-xx-xx)
## v5.0.63 (2024-XX-XX)

### Fixed

- Es wurde ein Fehler behoben, der dazu führte, dass der Benutzer auf die Homepage umgeleitet wurde, wenn die Sprache auf der Bestellbestätigungsseite geändert wurde.

## v5.0.62 (2024-XX-XX) <a href="https://github.com/plentymarkets/plugin-io/compare/5.0.61...5.0.62" target="_blank" rel="noopener"><b>Übersicht aller Änderungen</b></a>

### Behoben

- Ein Fehler bei der Prüfung von kanonischen Urls in Kombination mit ausgeschlossenen ShopBooster Parametern, kann zu fehlenden alternate links führen. Dies wurde behoben.

## v5.0.61 (2023-10-30) <a href="https://github.com/plentymarkets/plugin-io/compare/5.0.60...5.0.61" target="_blank" rel="noopener"><b>Übersicht aller Änderungen</b></a>

### Behoben
Expand Down
8 changes: 7 additions & 1 deletion meta/documents/changelog_en.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Release Notes for IO

## v5.0.62 (xxxx-xx-xx)
## v5.0.63 (2024-XX-XX)

### Fixed

- Solved a bug that manifested by redirecting the user to the homepage when the language was changed on order confirmation page.

## v5.0.62 (2023-XX-XX) <a href="https://github.com/plentymarkets/plugin-io/compare/5.0.61...5.0.62" target="_blank" rel="noopener"><b>Overview of all changes</b></a>

### Fixed

- An error when checking canonical urls in combination with excluded ShopBooster parameters can lead to missing alternate links. This was fixed.

## v5.0.61 (2023-10-30) <a href="https://github.com/plentymarkets/plugin-io/compare/5.0.60...5.0.61" target="_blank" rel="noopener"><b>Overview of all changes</b></a>

### Fixed
Expand Down
13 changes: 12 additions & 1 deletion src/Services/UrlService.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,19 @@ public function isCanonical($lang = null)
$request = pluginApp(Request::class);
$requestUri = $request->getRequestUri();

$url = explode('?', $requestUri)[0];

$queryParameters = $request->query();
$queryParameters = Utils::cleanUpExcludesContentCacheParams($queryParameters);
$queryParameters = http_build_query($queryParameters, null, '&', PHP_QUERY_RFC3986);
if (strlen($queryParameters) > 0)
{
$url .= '?' . $queryParameters;
}


/** @var UrlQuery $urlQuery */
$urlQuery = pluginApp(UrlQuery::class, ['path' => $requestUri]);
$urlQuery = pluginApp(UrlQuery::class, ['path' => $url]);
$requestUrl = $urlQuery->toAbsoluteUrl($lang !== $defaultLanguage);
$canonical = $this->getCanonicalURL($lang);

Expand Down

0 comments on commit 58c3dda

Please sign in to comment.