Page MenuHomePhabricator

Live preview not working with skins not shown in preferences
Open, MediumPublic

Description

Steps to Reproduce:

Actual Results:
An error message appears with API error unknown_useskin.

Expected Results:
The preview appears.

(Note that although this bug is most easily reproducible using the live preview feature and the Cologne Blue skin, I don’t think any of them are buggy—live preview is simply a front-end to the API, and Cologne Blue is a skin hidden from preferences.)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Anomie added a subscriber: Anomie.

The API is declaring valid values for the parameter using Skin::getAllowedSkins(), which omits skins in $wgSkipSkins. That could be changed to use Skin::getSkinNames() which doesn't check $wgSkipSkins. A side effect would be that it would also list the internal skins "fallback" and "apioutput"; that's probably ok.

Ammarpad raised the priority of this task from Low to Medium.Aug 8 2021, 1:23 PM
Ammarpad added a subscriber: Ammarpad.

Intention of both T287616 and T223824 is to let existing users to continue using these skins with no change in behavior, so the API should support these skins since they are not really disabled. We can either go with T237856#5656455 or just add the skipped skins to the allowed values (which will avoid listing the internal skins; albeit they're already supported with ?useskin parameter anyway).

Ammarpad renamed this task from Live preview not working with Cologne Blue to Live preview not working with skins not shown in preference.Aug 8 2021, 1:28 PM

Change 710678 had a related patch set uploaded (by Ammarpad; author: Ammarpad):

[mediawiki/core@master] ApiParse: Support hidden skins

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

Tacsipacsi renamed this task from Live preview not working with skins not shown in preference to Live preview not working with skins not shown in preferences.Aug 8 2021, 7:10 PM

Change 710678 merged by jenkins-bot:

[mediawiki/core@master] ApiParse: Support hidden skins

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