Page MenuHomePhabricator

internal_api_error_DBQueryError (API): Undefined variable: actorQuery
Closed, ResolvedPublic

Description

3: internal_api_error_DBQueryError: [Wpj7CQpAMD4AAK9AqykAAAAN] Database query error. at ...
3: internal_api_error_DBQueryError: [Wpj7NQpAMDkAABR0oYwAAAAQ] Database query error. at ...
3: internal_api_error_DBQueryError: [Wpj7VApAEDMAAI5XUwIAAACC] Database query error. at ...
3: internal_api_error_DBQueryError: [Wpj7hgpAEDIAACO5p2MAAAAE] Database query error. at ...
3: internal_api_error_DBQueryError: [Wpj7sQpAMEMAAE3ZnIcAAAAJ] Database query error. at ...
3: internal_api_error_DBQueryError: [Wpj7zQpAMD8AAFuT0c4AAAAH] Database query error. at ...
3: internal_api_error_DBQueryError: [Wpj8IApAEMMAAEv3fP8AAACN] Database query error. at ...

while

my $contributors = $mw->api ( {
action => 'query',
prop => 'contributors',

Event Timeline

XRay created this task.Mar 3 2018, 7:20 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 3 2018, 7:20 AM
Aklapper changed the task status from Open to Stalled.Mar 3 2018, 2:33 PM

Hi @XRay, thanks for taking the time to report this!
Unfortunately this report lacks some information. If you have time and can still reproduce the problem: Please add a more complete description to this report (a list of steps to reproduce which leave no room for interpretation what to do, describing actual results and expected results after performing the steps to reproduce, attaching or linking to a public testcase, etc). You can edit the task description by clicking Edit Task.
Ideally, exact and clear steps to reproduce should allow any other person to follow these steps (without having to interpret those steps) and see the same results. Problems that others can reliably reproduce can get fixed faster. Thanks!

Aklapper changed the task status from Stalled to Open.EditedMar 3 2018, 2:38 PM

Ah, I finally found the stacktrace of that crash. Please ignore my previous comment!

[Wpj7sQpAMEMAAE3ZnIcAAAAJ] /w/api.php   ErrorException from line 177 of /srv/mediawiki/php-1.31.0-wmf.23/includes/api/ApiQueryContributors.php: PHP Notice: Undefined variable: actorQuery

Query: SELECT  rev_page AS `page`,rev_user AS `id`,MAX(rev_user) AS `userid`,MAX(rev_user_text) AS `username`  FROM `revision` LEFT JOIN `revision_comment_temp` `temp_rev_comment` ON ((temp_rev_comment.revcomment_rev = rev_id)) LEFT JOIN `comment` `comment_rev_comment` ON ((comment_rev_comment.comment_id = temp_rev_comment.revcomment_comment_id)) LEFT OUTER JOIN `user_groups` ON ((ug_user=) AND ug_group = 'bot' AND (ug_expiry IS NULL OR ug_expiry >= '20180302072225'))   WHERE rev_page = '33945664' AND (rev_user != 0) AND ((rev_deleted & 4) = 0) AND (ug_user IS NULL)  GROUP BY rev_page,rev_user ORDER BY id LIMIT 5001  
Function: ApiQueryContributors::execute
Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') AND ug_group = 'bot' AND (ug_expiry IS NULL OR ug_expiry >= '20180302072225'))' at line 1 (10.64.0.93)

Note the (ug_user=).

Aklapper renamed this task from internal_api_error_DBQueryError (API) (in Wikimedia Commons) to internal_api_error_DBQueryError (API): Undefined variable: actorQuery.Mar 3 2018, 2:42 PM

Change 416332 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] ApiQueryContributors: Use correct variable

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

Anomie claimed this task.Mar 4 2018, 4:32 AM
Anomie moved this task from Unsorted to Needs Review on the MediaWiki-API board.

Change 416332 merged by jenkins-bot:
[mediawiki/core@master] ApiQueryContributors: Use correct variable

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

Anomie closed this task as Resolved.Mar 6 2018, 2:59 PM

The fix should be deployed to Wikimedia wikis with 1.31.0-wmf.24. See https://www.mediawiki.org/wiki/MediaWiki_1.31/Roadmap for the schedule.