Page MenuHomePhabricator

Resetting a global preference via API does not work
Closed, DuplicatePublic

Description

Steps to reproduce:

  1. On https://en.wikipedia.org/wiki/Special:GlobalPreferences#mw-prefsection-rendering, set your skin globally to "Modern".
  2. On https://en.wikipedia.org/wiki/Special:ApiSandbox, select globalpreferences as action, select the first example ("Make a single preference non-global", which will make skin non-global again), and make the request.

Expected: The skin should use the local preference again.
Actual: The skin is still global, you have to reset it on Special:GlobalPreferences instead of using the API.

This also happens for other preferences, if you try this with userjs-* preferences there is no way to make them non-global again, as these are not on Special:GlobalPreferences.

Event Timeline

Schnark created this task.Sep 8 2018, 9:23 AM
Restricted Application added a project: Community-Tech. · View Herald TranscriptSep 8 2018, 9:23 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@MaxSem Can you try and reproduce this bug?

This also happens for other preferences, if you try this with userjs-* preferences there is no way to make them non-global again, as these are not on Special:GlobalPreferences.

Ignore that. It does work for userjs-* preferences. Probably I just got confused by T188886: TagMultiSelectWidget misleadingly leaves uncommitted input text visible when unfocused.

This also happens for other preferences, if you try this with userjs-* preferences there is no way to make them non-global again, as these are not on Special:GlobalPreferences.

Ignore that. It does work for userjs-* preferences. Probably I just got confused by T188886: TagMultiSelectWidget misleadingly leaves uncommitted input text visible when unfocused.

I don't know, what I did when I wrote the last comment, but now it does not work. Steps to reproduce:

  1. Save userjs-foo=foo as global preference: https://de.wikipedia.org/wiki/Spezial:ApiSandbox#action=globalpreferences&format=json&change=userjs-foo%3Dfoo
  2. Confirm it is set properly: https://de.wikipedia.org/wiki/Spezial:ApiSandbox#action=query&format=json&meta=globalpreferences
  3. Remove userjs-foo as global preference: https://de.wikipedia.org/wiki/Spezial:ApiSandbox#action=globalpreferences&format=json&change=userjs-foo
  4. Repeat step 2.

Expected: The preference should be gone.
Actual: It is still there, with the old value, even though step 3 complete with "success".