Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Blitz Diagnostics when using PosgreSQL #621

Closed
borisklotz opened this issue Feb 19, 2024 · 1 comment
Closed

Error in Blitz Diagnostics when using PosgreSQL #621

borisklotz opened this issue Feb 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@borisklotz
Copy link

Bug Report

I just updated the plugin to the latest version. Now I get the following error when I go to Blitz Diagnostics > Tracked Elements and click on one of the listed element types:

SQLSTATE[42803]: Grouping error: 7 ERROR: column "elementexpirydates.expiryDate" must appear in the GROUP BY clause or be used in an aggregate function
LINE 2: FROM (SELECT "elementcaches"."elementId", "elementexpirydate...
^
The SQL being executed was: SELECT COUNT(*)
FROM (SELECT "elementcaches"."elementId", "elementexpirydates"."expiryDate", count(*) AS "count", "title"
FROM "blitz_elementcaches" "elementcaches"
INNER JOIN "blitz_caches" ON "elementcaches"."cacheId" = "blitz_caches"."id"
LEFT JOIN "blitz_elementexpirydates" "elementexpirydates" ON "elementexpirydates"."elementId" = "elementcaches"."elementId"
INNER JOIN "elements" "elements" ON "elements"."id" = "elementcaches"."elementId"
INNER JOIN "content" "content" ON "content"."elementId" = "elementcaches"."elementId"
WHERE ("blitz_caches"."siteId"=1) AND ("content"."siteId"=1) AND ("type"='craft\elements\Entry')
GROUP BY "elementcaches"."elementId", "title"
ORDER BY "count" DESC) "c"

We are using PostgreSQL, so the error might only be related to this particular RDBMS.

Plugin Version

4.11.1

Craft CMS Version

4.7.3

PHP Version

8.1.0

@borisklotz borisklotz added the bug Something isn't working label Feb 19, 2024
@bencroker
Copy link
Collaborator

Thanks for reporting that!

Fixed in 84fe788 and released in 4.11.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants