Page MenuHomePhabricator

[1.42.0-wmf.13] safemode is not propagated on pages
Closed, ResolvedPublicBUG REPORT

Description

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

  • According to https://www.mediawiki.org/wiki/Manual:Safemode#Usage in Preferences menu, under TAB Appearance → Advanced options, I activated "Always enable safe mode" -> ok, done
  • This shows Appearance message -> Custom CSS/JavaScript are currently unavailable as safe mode has been enabled. Please disable safe mode to use custom CSS/JavaScript. => ok
  • and gadgets page shows message -> Gadgets are currently unavailable as safe mode has been enabled. Please disable safe mode to use gadgets. => ok
  • I disconnect/reconnect - Preferences are kept => ok
  • When I open a page let us say "Technical Manual" in the sidebar

What happens?:

What should have happened instead?:

Software version (skip for WMF-hosted wikis like Wikipedia):

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

Event Timeline

The "Always enable safe mode" option seems broken after rMW8901f72e234a.

The "Always enable safe mode" option seems broken after rMW8901f72e234a.

Looks like the code supporting this was removed here: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/965563/23/includes/MediaWiki.php#b235 (it was added in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/940156/13/includes/MediaWiki.php). I guess it was a mistake when solving a merge conflict?

@daniel Can you find a place for it in the new version?

Change 994119 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] index.php: Restore support for forcesafemode option.

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

Looks like the code supporting this was removed here: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/965563/23/includes/MediaWiki.php#b235 (it was added in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/940156/13/includes/MediaWiki.php). I guess it was a mistake when solving a merge conflict?

Yep, my bad. Sorry!

@daniel Can you find a place for it in the new version?

Done (but not tested): https://gerrit.wikimedia.org/r/c/mediawiki/core/+/994119

Change 994119 merged by jenkins-bot:

[mediawiki/core@master] index.php: Restore support for forcesafemode option.

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

Worth backporting, or should we just have it ride the train?

Jdforrester-WMF renamed this task from safemode is not propagated on pages to [1.42.0-wmf.13] safemode is not propagated on pages.Jan 30 2024, 2:16 PM

Worth backporting, or should we just have it ride the train?

A UX problem is that if you opt-in to always-use-safemode, it breaks your ability to opt-out of gadgets (while still allowing those scripts to execute and simultaneously advertising that it is falsely working).

Worth backporting, or should we just have it ride the train?

A UX problem is that if you opt-in to always-use-safemode, it breaks your ability to opt-out of gadgets (while still allowing those scripts to execute and simultaneously advertising that it is falsely working).

OK, but that's not germane to this task, which is about a regression in the availability of this feature, not about how it works. :-)

Change 994710 had a related patch set uploaded (by Bartosz Dziewoński; author: Daniel Kinzler):

[mediawiki/core@wmf/1.42.0-wmf.15] index.php: Restore support for forcesafemode option.

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

Change 994711 had a related patch set uploaded (by Bartosz Dziewoński; author: Daniel Kinzler):

[mediawiki/core@wmf/1.42.0-wmf.16] index.php: Restore support for forcesafemode option.

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

Change 994710 merged by jenkins-bot:

[mediawiki/core@wmf/1.42.0-wmf.15] index.php: Restore support for forcesafemode option.

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

Change 994711 merged by jenkins-bot:

[mediawiki/core@wmf/1.42.0-wmf.16] index.php: Restore support for forcesafemode option.

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

Mentioned in SAL (#wikimedia-operations) [2024-01-31T14:20:20Z] <urbanecm@deploy2002> Started scap: Backport for [[gerrit:994702|[metawiki] Let admins add/remove the event-organizer group (T356070)]], [[gerrit:994711|index.php: Restore support for forcesafemode option. (T355314)]]

Mentioned in SAL (#wikimedia-operations) [2024-01-31T14:21:49Z] <urbanecm@deploy2002> daimona and matmarex and urbanecm: Backport for [[gerrit:994702|[metawiki] Let admins add/remove the event-organizer group (T356070)]], [[gerrit:994711|index.php: Restore support for forcesafemode option. (T355314)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-01-31T14:30:26Z] <urbanecm@deploy2002> Finished scap: Backport for [[gerrit:994702|[metawiki] Let admins add/remove the event-organizer group (T356070)]], [[gerrit:994711|index.php: Restore support for forcesafemode option. (T355314)]] (duration: 10m 05s)