Last modified: 2013-08-07 07:02:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53761, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51761 - "Exception Caught: Language not set" with messagegroupstats WebAPI query and dynamic group
"Exception Caught: Language not set" with messagegroupstats WebAPI query and ...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Translate (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Niklas Laxström
http://translatewiki.net/w/api.php?ac...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-20 21:07 UTC by Nemo
Modified: 2013-08-07 07:02 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nemo 2013-07-20 21:07:30 UTC
Calling action=query&meta=messagegroupstats with a dynamic group, e.g. URL, produces:

{
    "error": {
        "code": "internal_api_error_MWException",
        "info": "Exception Caught: Language not set",
        "*": "\n\n#0 /www/translatewiki.net/w/extensions/Translate/messagegroups/MessageGroupOld.php(300): RecentMessageGroup->getDefinitions()\n#1 /www/translatewiki.net/w/extensions/Translate/utils/MessageGroupStats.php(374): MessageGroupOld->initCollection('aa')\n#2 /www/translatewiki.net/w/extensions/Translate/utils/MessageGroupStats.php(327): MessageGroupStats::calculateGroup(Object(RecentAdditionsMessageGroup), 'aa')\n#3 /www/translatewiki.net/w/extensions/Translate/utils/MessageGroupStats.php(265): MessageGroupStats::forItemInternal(Array, Object(RecentAdditionsMessageGroup), 'aa')\n#4 /www/translatewiki.net/w/extensions/Translate/utils/MessageGroupStats.php(114): MessageGroupStats::forGroupInternal(Object(RecentAdditionsMessageGroup))\n#5 /www/translatewiki.net/w/extensions/Translate/api/ApiQueryMessageGroupStats.php(29): MessageGroupStats::forGroup('!additions')\n#6 /www/translatewiki.net/w/extensions/Translate/api/ApiStatsQuery.php(25): ApiQueryMessageGroupStats->getData()\n#7 /www/translatewiki.net/w/includes/api/ApiQuery.php(273): ApiStatsQuery->execute()\n#8 /www/translatewiki.net/w/includes/api/ApiMain.php(840): ApiQuery->execute()\n#9 /www/translatewiki.net/w/includes/api/ApiMain.php(380): ApiMain->executeAction()\n#10 /www/translatewiki.net/w/includes/api/ApiMain.php(351): ApiMain->executeActionWithErrorHandling()\n#11 /www/translatewiki.net/w/api.php(73): ApiMain->execute()\n#12 {main}\n\n"
    }
}

Expected: stats for the messages contained in the group for each language (at least for !additions) are produced, or a meaningful error message is provided.

Note that !additions and !recent are not allowed as input in the special page (which just ignores them).
Comment 1 Gerrit Notification Bot 2013-07-21 07:59:36 UTC
Change 74944 had a related patch set uploaded by Nikerabbit:
Check and disallowe dynamic groups in ApiQueryMessageGroupStats

https://gerrit.wikimedia.org/r/74944
Comment 2 Gerrit Notification Bot 2013-08-07 05:48:50 UTC
Change 74944 merged by jenkins-bot:
Check and disallow dynamic groups in ApiQueryMessageGroupStats

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links