⚓ T292011 mw.config variables for use in mediawiki.Title should use package files
Page Menu
Phabricator
Create Task
Maniphest
T292011
mw.config variables for use in mediawiki.Title should use package files
Open, Needs Triage
Public
Actions
Edit Task
Edit Related Tasks...
Create Subtask
Edit Parent Tasks
Edit Subtasks
Merge Duplicates In
Close As Duplicate
Edit Related Objects...
Edit Commits
Edit Mocks
Mute Notifications
Protect as security issue
Assigned To
None
Authored By
DannyS712
Sep 28 2021, 7:29 PM
2021-09-28 19:29:51 (UTC+0)
Tags
MediaWiki-User-Interface
(Backlog)
User-DannyS712
(Awaiting review and deployment)
UploadWizard
(Backlog)
MediaUploader
(Compat/Interoperability)
User-notice
(Already announced/Archive)
Convenient-Discussions
(External)
Patch-Needs-Improvement
Referenced Files
None
Subscribers
Aklapper
DannyS712
Jack_who_built_the_house
Nardog
Ostrzyciel
Quiddity
SD0001
Description
Currently, on all responses mw.config includes configuration variables
wgExtraSignatureNamespaces
wgLegalTitleChars
, and
wgIllegalFileChars
. These are documented[1] as being
@internal For mediawiki.Title
We should switch to providing them via package files instead, so that they are only loaded when the mediawiki.Title module is used.
Uses in javascript
wgExtraSignatureNamespaces
- correctly only used by mediawiki.Title
wgLegalTitleChars
- correctly only used by mediawiki.Title
wgIllegalFileChars
- also being used by UploadWizard extension (deployed) and MediaUploader (not deployed)
Proposal:
Switch extensions (at least UploadWizard) to use package files with injected config
Switch mediawiki.Title to use package files with injected config, and remove from mw.config (with a mention in the release notes just in case)
[1]
Details
Related Changes in Gerrit:
Subject
Repo
Branch
Lines +/-
Move mediawiki.Title configuration settings to package files
mediawiki/core
master
+31
-11
Customize query in gerrit
Event Timeline
DannyS712
created this task.
Sep 28 2021, 7:29 PM
2021-09-28 19:29:51 (UTC+0)
Restricted Application
added a project:
User-DannyS712
View Herald Transcript
Sep 28 2021, 7:29 PM
2021-09-28 19:29:51 (UTC+0)
Restricted Application
added a subscriber:
Aklapper
View Herald Transcript
DannyS712
added a comment.
Edited
Sep 28 2021, 7:39 PM
2021-09-28 19:39:59 (UTC+0)
Comment Actions
Hmm, except both of the extensions (it looks like MediaUpload's code is a copy of UploadWizard) are using
scripts
instead of
packageFiles
, so that might not be easy to do. Maybe we can reuse the mw.Title validation of illegal file characters instead of doing it in the extensions too? Don't really see how to do that. Perhaps instead we can have mw.Title add the wgIllegalFileChars to mw.config, so that anything depending on it can also use it...
We can start by switching mediawiki.Title to package files and dropping the first two configs (extra signatures and legal title chars) from mw.config, and deal with illegal file chars later
gerritbot
added a comment.
Sep 28 2021, 7:43 PM
2021-09-28 19:43:17 (UTC+0)
Comment Actions
Change 724382 had a related patch set uploaded (by DannyS712; author: DannyS712):
[mediawiki/core@master] Moving mediawiki.Title configuration settings to package files
gerritbot
added a project:
Patch-For-Review
Sep 28 2021, 7:43 PM
2021-09-28 19:43:18 (UTC+0)
DannyS712
moved this task from
Unsorted
to
Awaiting review and deployment
on the
User-DannyS712
board.
Sep 28 2021, 8:29 PM
2021-09-28 20:29:14 (UTC+0)
DannyS712
added a project:
User-notice
Edited
Sep 28 2021, 10:12 PM
2021-09-28 22:12:28 (UTC+0)
DannyS712
added a subscriber:
Jack_who_built_the_house
Comment Actions
Per global search, used by some onwiki scripts, including use of
wgExtraSignatureNamespaces
in convenient discussions scripts (cc
@Jack_who_built_the_house
Jack_who_built_the_house
added a comment.
Sep 29 2021, 12:33 AM
2021-09-29 00:33:21 (UTC+0)
Comment Actions
Thanks for the ping. To
Convenient-Discussions
, the unavailability of
wgExtraSignatureNamespaces
as a config value will mean that in the general case, CD will have to wait until the modules (lots of them) are loaded to tell if the current page is a talk page, where CD should run. Luckily,
mediawiki.Title
is usually already loaded by the time CD runs, so I will just run a check for
mw.loader.getState('mediawiki.Title') === 'ready'
and then do the namespace check. If
mediawiki.Title
is not ready, only then the modules will be requested.
Jack_who_built_the_house
added a project:
Convenient-Discussions
Sep 29 2021, 12:38 AM
2021-09-29 00:38:17 (UTC+0)
Ostrzyciel
subscribed.
Sep 29 2021, 6:29 AM
2021-09-29 06:29:52 (UTC+0)
Comment Actions
In
T292011#7385545
@DannyS712
wrote:
Hmm, except both of the extensions (it looks like MediaUpload's code is a copy of UploadWizard)
JS code should be almost identical, for now. Any fix for UW should be easily applicable to MU.
As for the solution, I don't really care as long as it works. There are some methods in Title that may be able to help with this, but currently I do not have the time to fiddle with this. :(
Ostrzyciel
moved this task from
To Triage
to
Compat/Interoperability
on the
MediaUploader
board.
Sep 29 2021, 6:30 AM
2021-09-29 06:30:26 (UTC+0)
Quiddity
subscribed.
Sep 30 2021, 6:13 PM
2021-09-30 18:13:22 (UTC+0)
Comment Actions
@DannyS712
Hi. Re: Tech News -
What
would you suggest as the content, and
When
should it be included?
(I'm currently editing the edition that is due to be frozen-for-translations tomorrow (~25hours from now), and to be delivered on Monday). Thanks!
DannyS712
moved this task from
To Triage
to
Not ready to announce
on the
User-notice
board.
Sep 30 2021, 7:21 PM
2021-09-30 19:21:47 (UTC+0)
Comment Actions
In
T292011#7392337
@Quiddity
wrote:
@DannyS712
Hi. Re: Tech News -
What
would you suggest as the content, and
When
should it be included?
(I'm currently editing the edition that is due to be frozen-for-translations tomorrow (~25hours from now), and to be delivered on Monday). Thanks!
Lets wait until at least next week. As for content, something also the lines of
The JavaScript mw.config no longer contains the values for
wgExtraSignatureNamespaces
wgLegalTitleChars
, and
wgIllegalFileChars
. These had previously be documented as for internal use and were not part of the "stable" variables available for use in wiki JavaScript.
DannyS712
moved this task from
Not ready to announce
to
To Triage
on the
User-notice
board.
Sep 30 2021, 7:24 PM
2021-09-30 19:24:17 (UTC+0)
Comment Actions
In
T292011#7392742
@DannyS712
wrote:
In
T292011#7392337
@Quiddity
wrote:
@DannyS712
Hi. Re: Tech News -
What
would you suggest as the content, and
When
should it be included?
(I'm currently editing the edition that is due to be frozen-for-translations tomorrow (~25hours from now), and to be delivered on Monday). Thanks!
Lets wait until at least next week. As for content, something also the lines of
The JavaScript mw.config no longer contains the values for
wgExtraSignatureNamespaces
wgLegalTitleChars
, and
wgIllegalFileChars
. These had previously be documented as for internal use and were not part of the "stable" variables available for use in wiki JavaScript.
Actually, you can probably announce now that they will be removed soon
The JavaScript mw.config will soon no longer contain the values for
wgExtraSignatureNamespaces
wgLegalTitleChars
, and
wgIllegalFileChars
. These are currently documented as for internal use and are not part of the "stable" variables available for use in wiki JavaScript.
Quiddity
moved this task from
To Triage
to
In current Tech/News draft
on the
User-notice
board.
Sep 30 2021, 8:13 PM
2021-09-30 20:13:38 (UTC+0)
Nardog
subscribed.
Oct 6 2021, 1:03 PM
2021-10-06 13:03:36 (UTC+0)
Quiddity
moved this task from
In current Tech/News draft
to
Already announced/Archive
on the
User-notice
board.
Oct 7 2021, 7:40 PM
2021-10-07 19:40:10 (UTC+0)
SD0001
subscribed.
Oct 15 2021, 11:07 AM
2021-10-15 11:07:38 (UTC+0)
DannyS712
removed
DannyS712
as the assignee of this task.
Oct 5 2023, 9:41 PM
2023-10-05 21:41:10 (UTC+0)
Comment Actions
I'm sorry that I haven't handled this task. I recently returned from a long bout of unexpected inactivity, and while I plan to resume my contributions here on Phabricator its unfair to claim tasks that I might not work on when others may be interested in handling them. I'm removing myself as the assignee in a batch-action, but if someone feels that I really should be the one to handle this task feel free to re-assign me and I'll take a look.
Pppery
edited projects, added
Patch-Needs-Improvement
; removed
Patch-For-Review
Nov 9 2023, 11:53 PM
2023-11-09 23:53:39 (UTC+0)
Iniquity
moved this task from
Backlog
to
External
on the
Convenient-Discussions
board.
Jan 18 2024, 7:26 PM
2024-01-18 19:26:22 (UTC+0)
gerritbot
added a comment.
Mon, Mar 30, 1:12 PM
2026-03-30 13:12:58 (UTC+0)
Comment Actions
Change #724382
abandoned
by Hashar:
[mediawiki/core@master] Move mediawiki.Title configuration settings to package files
gerritbot
added a comment.
Mon, Mar 30, 11:38 PM
2026-03-30 23:38:25 (UTC+0)
Comment Actions
Change #724382
restored
by Thcipriani:
[mediawiki/core@master] Move mediawiki.Title configuration settings to package files
gerritbot
added a project:
Patch-For-Review
Mon, Mar 30, 11:38 PM
2026-03-30 23:38:26 (UTC+0)
Restricted Application
removed a project:
Patch-Needs-Improvement
View Herald Transcript
Mon, Mar 30, 11:38 PM
2026-03-30 23:38:26 (UTC+0)
Pppery
edited projects, added
Patch-Needs-Improvement
; removed
Patch-For-Review
Tue, Mar 31, 12:52 AM
2026-03-31 00:52:08 (UTC+0)
Log In to Comment
Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct.
Wikimedia Foundation
Code of Conduct
Disclaimer
CC-BY-SA
GPL
Credits