Page MenuHomePhabricator

'wiki.cx_translations.translation_last_updated_timestamp' isn't in GROUP BY (ContentTranslation\Translation::getTrendByStatus)
Closed, ResolvedPublic2 Estimated Story Points

Description

While investigating T211174: list=contenttranslationtrend sometimes uses invalid query I got the following error:

2023-12-04 11:35:53 dev.translatewiki.net wiki: [529238b0d9fc6b30b4074e6c] /w/api.php?action=query&format=json&list=contenttranslationlangtrend&target=rn   Wikimedia\Rdbms\DBQueryError: Error 1055: 'wiki.cx_translations.translation_last_updated_timestamp' isn't in GROUP BY
Function: ContentTranslation\Translation::getTrendByStatus
Query: SELECT  translation_last_updated_timestamp AS `date`,COUNT(translation_id) AS `count`  FROM `cx_translations`    WHERE (translation_status = 'published' OR (translation_target_url IS NOT NULL)) AND translation_target_language = 'rn'  GROUP BY YEARWEEK(translation_last_updated_timestamp, 3)

Event Timeline

Nikerabbit triaged this task as Low priority.
Nikerabbit moved this task from Needs Triage to Bugs on the ContentTranslation board.
Nikerabbit updated the task description. (Show Details)

Change #1036571 had a related patch set uploaded (by Nikerabbit; author: Nikerabbit):

[mediawiki/extensions/ContentTranslation@master] Fix SQL strict mode errors

https://gerrit.wikimedia.org/r/1036571

Change #1036571 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Fix SQL strict mode errors

https://gerrit.wikimedia.org/r/1036571