Page MenuHomePhabricator

IP auto-reveal: only the error code is shown on error
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

When turning on or off the auto-reveal via the dialog, if the API request to set the global preferences returns an error we only display the error code in the UI, such as notloggedin or readonly. A user might not know what these mean.

Steps to reproduce problem
  1. You need a test environment with CheckUser and a test user in the checkuser group
  2. Login as the user in the checkuser group
  3. Do something that will prevent you from setting your global preferences, for example
    1. Keep the current tab open and in another tab logout
    2. In your LocalSettings.php set $wgReadOnly = true;
  4. Open the tools menu and click IP Auto-reveal
  5. Fill the form in as necessary and submit

Expected behaviour: An informative error message telling you what is wrong
Observed behaviour: Just a one word error message

Environment

Wiki(s): local docker CheckUser 2.5 (11198de) 15:53, 27 October 2025.

Screenshots

ipreveal_auto-reveal_error_code.png (313×534 px, 19 KB)

Event Timeline

Niharika triaged this task as Medium priority.Nov 7 2025, 8:42 AM

Change #1203884 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/CheckUser@master] IP auto-reveal: Display meaningful error message on API error

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

Change #1203884 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] IP auto-reveal: Display meaningful error message on API error

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

QA Status: QA PASS

When the SI is signed out in a different tab and then the initial tab looks like its signed on as described in the test step above. Clicking the IP reveal and clicking on displays the reason istead of one word error code message