Nothing Special   »   [go: up one dir, main page]

Page MenuHomePhabricator

IP Information checkboxes can have incorrect enabled states when they are set globally
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

After settings the two checkboxes in the IP Information section globally, the state of I agree to use this information for my patrolling and anti-vandalism work in Special:Preferences can be incorrect:

  1. After checking Show the IP Information tool on Special:Contributions page for IP addresses, it is enabled even if the local exception is not checked
  2. If you then check the local exception, it becomes disabled

I agree to use this information for my patrolling and anti-vandalism work should be enabled when Show the IP Information tool on Special:Contributions page for IP addresses is checked (this is how the two options behave when not set globally), but only if its local exception is also checked.

The way to work around this bug I have found is to check the local exception for I agree to use this information for my patrolling and anti-vandalism work first and then check Show the IP Information tool on Special:Contributions page for IP addresses.

Steps to reproduce problem
  1. Login as a user with Administrator rights
  2. Go to Special:GlobalPreferences (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/Special:GlobalPreferences)
  3. Make Show the IP Information tool on Special:Contributions page for IP addresses and I agree to use this information for my patrolling and anti-vandalism work global options
  4. Go to Special:Preferences
  5. Check Show the IP Information tool on Special:Contributions page for IP addresses and its local exception (you will have to check the latter first)

Expected behavior: I agree to use this information for my patrolling and anti-vandalism work remains disabled
Observed behavior: I agree to use this information for my patrolling and anti-vandalism work becomes enabled, even though the local exception has not been checked

  1. Check the local exception for I agree to use this information for my patrolling and anti-vandalism work

Expected behavior: I agree to use this information for my patrolling and anti-vandalism work is enabled
Observed behavior: I agree to use this information for my patrolling and anti-vandalism work is disabled

Environment

Browser: Firefox 78
Wiki(s): https://en.wikipedia.beta.wmflabs.org GlobalPreferences 0.1.2 (c91eb42) 15:24, 9 December 2021.

Screenshots

Initial state of those two options in Special:Preferences:

ipinfo_options_before.png (176×625 px, 22 KB)

After checking the first option:
ipinfo_options_after.png (169×609 px, 22 KB)

After checking the local exception for the second option:
ipinfo_options_after_2.png (174×622 px, 23 KB)

Event Timeline

Func subscribed.

Should adapt in the IPInfo side, use 'disable-if' attr in the form descriptor instead.

Change 752272 had a related patch set uploaded (by Func; author: Func):

[mediawiki/extensions/IPInfo@master] Use native method to disable checkbox conditionally

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

Change 752272 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] Use native method to disable checkbox conditionally

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

I cannot reproduce this bug anymore.

I did not test very thoroughly because IPInfo will soon be disabled as a global preference (T299368).

Test Environment: https://en.wikipedia.beta.wmflabs.org IP Info 0.0.0 (41a1e35) 07:12, 17 January 2022.