Page MenuHomePhabricator

Pywikibot issue with list=allusers&augroup=bot on MediaWiki 1.12-15 (DBQueryError)
Closed, DeclinedPublic

Description

e.g. this fails

http://physics.lbl.gov/NuclearEnergy/api.php?action=query&list=allusers&augroup=bot&format=json&auprefix=D&aufrom=%21&auprop=editcount%7Cgroups%7Cregistration

API response received:
{"error":{"code":"internal_api_error_DBQueryError","info":"Database query error","*":""}}

but this succeeds:

http://physics.lbl.gov/NuclearEnergy/api.php?action=query&list=allusers&augroup=bot&format=json&auprefix=D&aufrom=%21&auprop=editcount%7Cregistration

by default pywikibot requests auprop=groups, causing tests to fail on wiki 1.12-1.15 at least ; MW fixed in 1.16.

More info on the error from 1.12.4

http://rnf.fisica.org.ar/api.php?action=query&list=allusers&augroup=bot&format=json&auprefix=D&aufrom=%21&auprop=editcount%7Cgroups%7Cregistration

{"error":{"code":"internal_api_error_DBUnexpectedError","info":"Exception Caught: A database error has occurred\nQuery: SELECT ug2.ug_group ug_group2,user_registration,user_name,user_editcount FROM mwuser INNER JOIN user_groups ug1 ON ug1.ug_user=user_id LEFT JOIN user_groups ug2 ON ug2.ug_user=user_id WHERE (user_name >= '!') AND (user_name LIKE \"D%\") AND ug1.ug_group = 'bot' ORDER BY user_name LIMIT 14 \nFunction: ApiQueryAllUsers::execute\nError: 1 ERROR: column \"D%\" does not exist\nLINE 1: ..._id WHERE (user_name >= '!') AND (user_name LIKE \"D%\") AND ...\n ^\n","*":"\n\n#0 \/home\/afa\/webapps\/rnf_wiki\/includes\/Database.php(799): DatabasePostgres->reportQueryError('ERROR: column ...', 1, 'SELECT ug2.ug_...', 'ApiQueryAllUser...', false)\n#1 \/home\/afa\/webapps\/rnf_wiki\/includes\/Database.php(1244): Database->query('SELECT ug2.ug_...', 'ApiQueryAllUser...')\n#2 \/home\/afa\/webapps\/rnf_wiki\/includes\/api\/ApiQueryBase.php(131): Database->select(Array, Array, Array, 'ApiQueryAllUser...', Array)\n#3 \/home\/afa\/webapps\/rnf_wiki\/includes\/api\/ApiQueryAllUsers.php(96): ApiQueryBase->select('ApiQueryAllUser...')\n#4 \/home\/afa\/webapps\/rnf_wiki\/includes\/api\/ApiQuery.php(209): ApiQueryAllUsers->execute()\n#5 \/home\/afa\/webapps\/rnf_wiki\/includes\/api\/ApiMain.php(355): ApiQuery->execute()\n#6 \/home\/afa\/webapps\/rnf_wiki\/includes\/api\/ApiMain.php(223): ApiMain->executeAction()\n#7 \/home\/afa\/webapps\/rnf_wiki\/includes\/api\/ApiMain.php(208): ApiMain->executeActionWithErrorHandling()\n#8 \/home\/afa\/webapps\/rnf_wiki\/api.php(77): ApiMain->execute()\n#9 {main}\n\n"}}

Strangely, another 1.12.4 site doesnt error:
https://wiki.umsl.edu/vcities/api.php?action=query&list=allusers&augroup=sysop&format=json&auprefix=D&aufrom=%21&auprop=editcount%7Cgroups%7Cregistration

1.11 has a different problem, in that it doesnt recognise the 'registration' auprop.

http://glossary.reuters.com/api.php?action=query&list=allusers&augroup=sysop&format=json&auprefix=D&aufrom=%21&auprop=editcount%7Cgroups%7Cregistration


Version: core-(2.0)
Severity: normal

Details

Reference
bz72850

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:55 AM
bzimport set Reference to bz72850.
bzimport added a subscriber: Unknown Object (????).

gerritadmin wrote:

Change 170514 had a related patch set uploaded by John Vandenberg:
Split the allusers test into multiple tests

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

gerritadmin wrote:

Change 170514 merged by jenkins-bot:
Split the allusers test into multiple tests

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

Xqt triaged this task as Lowest priority.Mar 4 2018, 12:54 PM
Xqt subscribed.

Should we increase the mw requirement to 1.16 instead of digging deeper into this matter. I guess there will nothing happen here after 4 years.

In T74850#4022027, @Xqt wrote:

Should we increase the mw requirement to 1.16 instead of digging deeper into this matter. I guess there will nothing happen here after 4 years.

+1 for increasing the required mw version (Not only that, I think we should drop support for versions that have reached their end-of-life)

Krinkle renamed this task from MediaWiki 1.12-15 respond with DBQueryError to allusers with group parameter and auprop=groups to Pywikibot issue with list=allusers&augroup=bot on MediaWiki 1.12-15 (DBQueryError).Apr 10 2018, 3:01 PM
Krinkle closed this task as Declined.