diff --git a/Config/module.xml b/Config/module.xml
index b5c1397..e2efa09 100644
--- a/Config/module.xml
+++ b/Config/module.xml
@@ -13,7 +13,7 @@
en_US
fr_FR
- 2.1.1
+ 2.1.2
Gilles Bourgeat
diff --git a/EventListener/CanonicalUrlListener.php b/EventListener/CanonicalUrlListener.php
index eb27c77..5e8674e 100644
--- a/EventListener/CanonicalUrlListener.php
+++ b/EventListener/CanonicalUrlListener.php
@@ -87,13 +87,7 @@ public function generateUrlCanonical(CanonicalUrlEvent $event): void
$canonicalUrl = rtrim($canonicalUrl, '/');
} else {
- if (null === $queryString = $request->server->get('QUERY_STRING')) {
- $queryString = $request->getQueryString();
- }
-
- if (!empty($queryString)) {
- $canonicalUrl .= '/?'.$queryString;
- }
+ $canonicalUrl .= '/?'. (array_key_exists("query", $parseUrlByCurrentLocale)) ? $parseUrlByCurrentLocale['query'] : "";
}
try {