Page MenuHomePhabricator

Web interface and API give different abuse log details when using formatversion=1
Closed, InvalidPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

Navigate to https://en.wikipedia.org/wiki/Special:AbuseLog/34250998

Try this in your browser console:

>> mw.config.get('wgAbuseFilterVariables').user_mobile
true

>> (await $.get("https://en.wikipedia.org/w/api.php?action=query&list=abuselog&afllogid=34250998&aflprop=details&format=json")).query.abuselog[0].details.user_mobile
""

What happens?:

As shown, the web interface is correctly showing user_mobile is true but the API is showing user_mobile is ""

What should have happened instead?:

user_mobile is true in both the API and web interface

Other information (browser name/version, screenshots, etc.):

The seems to be a regression; I've been working on a script for client-side filter testing, and it stopped working sometime in the last few weeks.

Event Timeline

JJMC89 subscribed.

For the default format version (formatversion=1), empty-string is true and an absent key is false. Specify formatversion=2 to get actual booleans.

Thanks, that does it. Was it really always this way?

Aklapper renamed this task from Web interface and API give different abuse log details to Web interface and API give different abuse log details when using formatversion=1.Jan 17 2023, 8:22 AM