diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fb1ec6e..c048a945 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,15 @@ # Release Notes for Blitz -## 4.11.2 - Unreleased +## 4.11.2 - 2024-02-19 ### Changed - Asset queries containing filenames are no longer tracked. +### Fixed + +- Fixed a bug in the diagnostics utility that only affected Postgres ([#621](https://github.com/putyourlightson/craft-blitz/issues/621)). + ## 4.11.1 - 2024-02-12 ### Fixed diff --git a/src/helpers/DiagnosticsHelper.php b/src/helpers/DiagnosticsHelper.php index c5da4e3e..e6a76c83 100644 --- a/src/helpers/DiagnosticsHelper.php +++ b/src/helpers/DiagnosticsHelper.php @@ -172,7 +172,7 @@ public static function getElementsQuery(int $siteId, string $elementType, ?int $ ->innerJoin(['elements' => Table::ELEMENTS], '[[elements.id]] = [[elementcaches.elementId]]') ->innerJoin(['content' => Table::CONTENT], '[[content.elementId]] = [[elementcaches.elementId]]') ->where($condition) - ->groupBy(['elementcaches.elementId', 'title']) + ->groupBy(['elementcaches.elementId', 'elementexpirydates.expiryDate', 'title']) ->asArray(); } @@ -192,7 +192,7 @@ public static function getElementQueriesQuery(int $siteId, string $elementType, ->innerJoinWith('cache') ->innerJoinWith('elementQuery') ->where($condition) - ->groupBy(ElementQueryRecord::tableName() . '.id') + ->groupBy([ElementQueryRecord::tableName() . '.id', 'params']) ->asArray(); }