Skip to content

Commit

Permalink
Fix missing columns in groupBy for Postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Feb 19, 2024
1 parent 8e9075b commit 84fe788
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/helpers/DiagnosticsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -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();
}

Expand Down

0 comments on commit 84fe788

Please sign in to comment.