⚓ T357580 [Technical admins] Vector scripts/styles will no longer apply on Vector 2022 on some wikis
Page Menu
Phabricator
Create Task
Maniphest
T357580
[Technical admins] Vector scripts/styles will no longer apply on Vector 2022 on some wikis
Closed, Resolved
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
Jdlrobson
Authored By
Jdlrobson
Feb 14 2024, 8:01 PM
2024-02-14 20:01:35 (UTC+0)
Tags
User-notice-archive
(Backlog)
Referenced Files
None
Subscribers
Aklapper
Dragoniez
Frostly
Izno
Jdlrobson
Johannnes89
Kenrick95
View All 14 Subscribers
Description
This was previously reported on
T331679
. There have been some changes to how user and site scripts load for Vector 2022 on certain wikis. Gadgets are not impacted. If you think you have been impacted or want to minimize impact to your project please see this ticket.
Wikis that have been impacted by this change
All projects where Vector legacy is the default skin
Wikivoyage
Wikibooks
Japanese Wikipedia
Please see "Reactive actions " for next steps.
What if my wiki is not impacted?
All other projects will be impacted over the next 3 months
. It is strongly advised that you coordinate and take action proactively rather than retroactively :)
Please see "Proactive actions " for next steps.
Proactive actions required to avoid disruption
For admins
Copy essential code in [[MediaWiki:Vector.js]] to [[MediaWiki:Vector-2022.js]]. Note temporarily this will load both sets of code so make sure that your code is setup defensively e.g. for example to avoid two identical buttons being added to a page.
Copy essential code in [[MediaWiki:Vector.css]] to [[MediaWiki:Vector-2022.css]]
Request to be fast tracked by commenting on this ticket by telling me your project e.g. en.wikipedia.org
Consider notifying your community in some way to mitigate the number of technical village pump / help requests you get relating to user scripts not working.
If you are a site administrator and have concerns and wish to be migrated last please explicitly note so on this ticket, mentioning the URL of your community.
Considering installing a gadget for all logged in users to migrate their user JS.
NOTE:
Code provided below is only intended as an example, please do not copy and paste it into your project if you don't know what it does.
function doMigrate() {
if ( mw.storage.get( 'vector-migration' ) ) {
return;
const api = new mw.Api();
const username = mw.user.getName();
const VECTOR_JS = `User:${username}/vector.js`;
const VECTOR_22_JS = `User:${username}/vector-2022.js`;
const VECTOR_CSS = `User:${username}/vector.css`;
const VECTOR_22_CSS = `User:${username}/vector-2022.css`;
api.get( {
action: 'query',
format: 'json',
titles: [
VECTOR_JS,
VECTOR_22_JS,
VECTOR_CSS,
VECTOR_22_CSS
],
prop: [ 'revisions', 'content' ],
rvprop: 'content',
formatversion: 2
} ).then( ( r ) => {
const content = {};
const rpages = r.query.pages
rpages.forEach( ( page ) => {
if ( page.revisions ) {
content[ page.title ] = page.revisions[0].content;
} );
const pages = rpages.filter( ( page ) => !page.missing ).map( ( page ) => page.title );
let migrateVJS = false;
let migrateVCSS = false;
if ( pages.indexOf( VECTOR_CSS ) > -1 && pages.indexOf( VECTOR_22_CSS ) === -1 && content[ VECTOR_CSS ] ) {
migrateVCSS = true;
if ( pages.indexOf( VECTOR_JS ) > -1 && pages.indexOf( VECTOR_22_JS ) === -1 && content[ VECTOR_JS ] ) {
migrateVJS = true;
mw.storage.set( 'vector-migration', 1 );
if ( !migrateVCSS && !migrateVJS ) {
return;
const ok = window.confirm( 'Do you want your user scripts for Vector to apply to Vector 2022?' );
if ( ok ) {
const promises = [];
if ( migrateVCSS ) {
promises.push(
api.postWithEditToken( {
action: 'edit',
title: VECTOR_22_CSS,
text: content[ VECTOR_CSS ]
} )
if ( migrateVJS ) {
promises.push(
api.postWithEditToken( {
action: 'edit',
title: VECTOR_22_JS,
text: content[ VECTOR_JS ]
} )
return Promise.all( promises ).then( () => {
location.reload();
} );
} )
if ( mw.config.get( 'skin' ) === 'vector-2022' ) {
doMigrate();
For users
Copy essential code in [[Special:MyPage/vector.js]] to [[Special:MyPage/vector-2022.js]]
Copy essential code in [[Special:MyPage/vector.css]] to [[Special:MyPage/vector-2022.css]]
Reactive actions required to restore old behaviour.
For admins
Copy essential code in [[MediaWiki:Vector.js]] to [[MediaWiki:Vector-2022.js]]
Copy essential code in [[MediaWiki:Vector.css]] to [[MediaWiki:Vector-2022.css]]
For users
Copy essential code in [[Special:MyPage/vector.js]] to [[Special:MyPage/vector-2022.js]]
Copy essential code in [[Special:MyPage/vector.css]] to [[Special:MyPage/vector-2022.css]]
Related Objects
Mentions
Mentioned In
T360384: [FYI] Site admins should be aware of change to how site and user scripts load on certain projects
T331679: Disable automatic sharing of site/user scripts between Vector and Vector 2022 skins
T347871: Create a URL parameter allowing to preview Vector 2022 not sharing scripts/styles with Vector legacy
T301212: Vector-2022.js should no longer load legacy Vector site and user scripts/styles
Mentioned Here
T316505: Provide latest skin usage data
T331679: Disable automatic sharing of site/user scripts between Vector and Vector 2022 skins
Event Timeline
Jdlrobson
created this task.
Feb 14 2024, 8:01 PM
2024-02-14 20:01:35 (UTC+0)
Restricted Application
added a subscriber:
Aklapper
View Herald Transcript
Feb 14 2024, 8:01 PM
2024-02-14 20:01:35 (UTC+0)
Jdlrobson
moved this task from
To Triage
to
Announce in next Tech/News
on the
User-notice
board.
Feb 14 2024, 9:43 PM
2024-02-14 21:43:16 (UTC+0)
Jdlrobson
mentioned this in
T301212: Vector-2022.js should no longer load legacy Vector site and user scripts/styles
Jdlrobson
renamed this task from
Vector scripts/styles will no longer apply on Vector 2022 on some wikis
to
[Technical admins] Vector scripts/styles will no longer apply on Vector 2022 on some wikis
Feb 14 2024, 9:52 PM
2024-02-14 21:52:15 (UTC+0)
Jdlrobson
updated the task description.
(Show Details)
Jdlrobson
updated the task description.
(Show Details)
Izno
changed the subtype of this task from "Bug Report" to "Task".
Feb 14 2024, 10:16 PM
2024-02-14 22:16:23 (UTC+0)
Izno
subscribed.
Feb 14 2024, 10:18 PM
2024-02-14 22:18:44 (UTC+0)
Comment Actions
Probably want to reframe the "what to do" section oriented toward two separate groups of users: tech admins and common users (with probably the common user first).
Jdlrobson
updated the task description.
(Show Details)
Feb 14 2024, 10:21 PM
2024-02-14 22:21:27 (UTC+0)
Jdlrobson
updated the task description.
(Show Details)
Comment Actions
Good idea! Thanks for suggestion
@Izno
- any chance I can convince you to be proactive on this one to give me more confidence going into this ? :-)
Izno
added a comment.
Feb 14 2024, 10:23 PM
2024-02-14 22:23:06 (UTC+0)
Comment Actions
I don't have the int admin perm right now, but I'll post an edit request Soon for it.
Izno
added a comment.
Feb 14 2024, 10:25 PM
2024-02-14 22:25:48 (UTC+0)
Comment Actions
As regards users, I'd like to see the tech notice go out first so I can be lazy and not put anything onwiki myself. :)
Jdlrobson
updated the task description.
(Show Details)
Feb 14 2024, 11:48 PM
2024-02-14 23:48:49 (UTC+0)
Jdlrobson
updated the task description.
(Show Details)
UOzurumba
subscribed.
Edited
Feb 15 2024, 11:36 PM
2024-02-15 23:36:30 (UTC+0)
Comment Actions
Hello
@Jdlrobson
and
@Izon
For this ticket, I will capture it in the tech news with this wording:
There are changes to how user and site scripts load for Vector 2022 on specific wikis. The changes impacted the following Wikis: all projects with Vector legacy as the default skin, Wikivoyage, and Wikibooks.
Gadgets are not impacted, and the changes will last for the next three months. If you have been affected or want to minimize the impact on your project, see this ticket. Please coordinate and take action proactively.
Please let me know if this wording is fine. I got the information from the description of the ticket; I am not sure what "User" in the wording refers to. Thanks!
Jdlrobson
added a comment.
Feb 16 2024, 1:47 AM
2024-02-16 01:47:52 (UTC+0)
Comment Actions
Sounds great! Thanks!
UOzurumba
moved this task from
Announce in next Tech/News
to
In current Tech/News draft
on the
User-notice
board.
Feb 16 2024, 4:20 AM
2024-02-16 04:20:30 (UTC+0)
Msz2001
subscribed.
Feb 16 2024, 11:29 AM
2024-02-16 11:29:44 (UTC+0)
Comment Actions
In
T357580#9549180
@UOzurumba
wrote:
There are changes to how user and site scripts load for Vector 2022 on specific wikis. The changes impacted the following Wikis: all projects with Vector legacy as the default skin, Wikivoyage, and Wikibooks.
Gadgets are not impacted, and the changes will last for the next three months. If you have been affected or want to minimize the impact on your project, see this ticket. Please coordinate and take action proactively.
Shouldn't it be rather the following:
There are changes to how user and site scripts load for Vector 2022 on specific wikis. The changes impacted the following Wikis: all projects with Vector legacy as the default skin, Wikivoyage, and Wikibooks. Other wikis will be affected in the next three months.
Gadgets are not impacted. If you have been affected or want to minimize the impact on your project, see this ticket. Please coordinate and take action proactively.
When reading the original wording, I get an impression that if these projects do nothing, the original behavior will be automatically restored after three months, whereas by reading the task description I understand that the change is being rolled out gradually, and the three months timeframe relates to when the rollout will be complete (and not reverted).
If I'm wrong, please correct me :)
Jdlrobson
added a comment.
Feb 16 2024, 3:37 PM
2024-02-16 15:37:50 (UTC+0)
Comment Actions
Thanks
@Msz2001
yes to clarify it's "Other wikis will be affected over the course of the next three months."
Yahya
subscribed.
Feb 16 2024, 7:58 PM
2024-02-16 19:58:07 (UTC+0)
Johannnes89
subscribed.
Feb 19 2024, 3:49 PM
2024-02-19 15:49:53 (UTC+0)
Frostly
subscribed.
Feb 19 2024, 7:01 PM
2024-02-19 19:01:07 (UTC+0)
Xover
subscribed.
Feb 20 2024, 1:33 PM
2024-02-20 13:33:10 (UTC+0)
Comment Actions
Erm. Are you trying to say that this change has already happened for the wikis listed as "Wikis impacted", or that these will be impacted when the change is made at some as yet undetermined point in the future?
Yesterday's Tech News was the first I heard of it, and the entire announcement is cast as a warning about an upcoming change, but on the fourth or fifth reading the use of past tense in the first two sentences seems to suggest this has already happened.
Xover
added a comment.
Feb 20 2024, 2:27 PM
2024-02-20 14:27:34 (UTC+0)
Comment Actions
In
T357580#9558982
@Xover
wrote:
Erm. Are you trying to say that this change has already happened for the wikis listed as "Wikis impacted", or that these will be impacted when the change is made at some as yet undetermined point in the future?
Sigh, yes, that is apparently exactly what you're trying to say. Or at the very least my testing indicates that Vector 2022 does not load ~/vector.js at the moment. Excuse me while I go replace village pump notifications and watchlist notices with the exact opposite instructions to what is currently there…
(you can take the use of
sotto voce
indelicate language as implied)
Jdlrobson
added a comment.
Feb 20 2024, 5:00 PM
2024-02-20 17:00:58 (UTC+0)
Comment Actions
@Xover
which project are you referring to? To be clear the change has only occurred so far on the following wikis where impact is expected to be minimal:
All projects where Vector legacy is the default skin
Wikivoyage
Wikibooks
Please also see the user notice from a year ago:
T331679
- I am sorry if you missed that announcement.
Xover
added a comment.
Feb 20 2024, 9:01 PM
2024-02-20 21:01:23 (UTC+0)
Comment Actions
In
T357580#9560369
@Jdlrobson
wrote:
@Xover
which project are you referring to? To be clear the change has only occurred so far on the following wikis where impact is expected to be minimal:
All projects where Vector legacy is the default skin
Wikivoyage
Wikibooks
Please also see the user notice from a year ago:
T331679
- I am sorry if you missed that announcement.
English Wikisource. And I'm not complaining about a lack of notice, I'm grousing about the confusing notice that
did
go out.
The only clue in that notice is that the word "impacted" is in the past tense, and it refers to the vague "projects with Vector legacy as the default". Otherwise the notice is forward-looking, talking about what should be done for a change coming in the future. It links to
this
task that has the same problem (and even worse, here it drowns in a huge hacky migration script and all the comments on the task, and the other task). It doesn't help that the future changes are not fixed to any specific timeframe (like a date, not "maybe by the end of last year, maybe sometime this year").
The only reason I figured out that this was a change already rolled out is that the notice and the task description were so annoyingly vague about the time frame for the presumed future change, which made it a pain to write good information for my project's community, that I went re-reading the task(s) and their comments again a couple of times. It took maybe three or four re-reads before the light dawned, and even then I had to make myself a dummy vector.js to test to be sure I'd got it right.
Jdlrobson
updated the task description.
(Show Details)
Feb 21 2024, 9:39 PM
2024-02-21 21:39:06 (UTC+0)
Jdlrobson
updated the task description.
(Show Details)
Jdlrobson
added a comment.
Feb 21 2024, 9:41 PM
2024-02-21 21:41:10 (UTC+0)
Comment Actions
Makes sense. Perhaps there should have been two user notices here. Sorry for the confusion.
@Xover
feel free to edit description in any way that might help. I've had a go at trying to make this easier to read.
Jdlrobson
mentioned this in
T347871: Create a URL parameter allowing to preview Vector 2022 not sharing scripts/styles with Vector legacy
Feb 22 2024, 1:14 AM
2024-02-22 01:14:17 (UTC+0)
Kenrick95
subscribed.
Feb 22 2024, 12:12 PM
2024-02-22 12:12:54 (UTC+0)
UOzurumba
moved this task from
In current Tech/News draft
to
Already announced/Archive
on the
User-notice
board.
Feb 22 2024, 3:56 PM
2024-02-22 15:56:42 (UTC+0)
Lofhi
subscribed.
Edited
Feb 23 2024, 12:24 AM
2024-02-23 00:24:54 (UTC+0)
Comment Actions
What would the WMF think about mass editing instead of using their "temporary" gadget based on individual actions? Currently, I see ~1 900 edits per minute, for all the projects. Adding 300 edits per minute to this average for 10 minutes in the middle of the night in Europe to process all the pages on frwiki would be an acceptable stress on the DBs? We have like ~ 1 000 pages, so *2.
Your script assumes that everyone will understand what it's all about, that they'll all log on within short time, and so on. This could drag on for months with editors coming in every week asking why X isn't working. Not speaking about the fact that the prompt is executed one time (oops, pressed cancel). Displaying it every time is not a solution. Adding a link to execute it on click too, since we are not sure that they will get the information.
Jdlrobson
added a comment.
Feb 23 2024, 1:04 AM
2024-02-23 01:04:23 (UTC+0)
Comment Actions
@Lofhi
thanks for reaching out! The code sample provided is just there for discussion as an option, I wouldn't recommend adding the code to a wiki without further modification (I've updated description to make that clearer). If there's interest the WMF can develop it further if people have concerns about disruption to their communities. We could also run a script to do this migration if needed.
FWIW I personally think that this should be a manual process. Many users copied code into Vector.js/css 9+ years ago so it's probably better that they use the opportunity to review it and copy across only the code they need. AS you point out many users are inactive so creating the pages for those users is unnecessary and possibly even dangerous as there is no guarantee that code is still compatible with Vector 2022.
Jdlrobson
updated the task description.
(Show Details)
Feb 23 2024, 1:05 AM
2024-02-23 01:05:01 (UTC+0)
Jdlrobson
updated the task description.
(Show Details)
Lofhi
added a comment.
Feb 23 2024, 8:23 PM
2024-02-23 20:23:37 (UTC+0)
Comment Actions
@Jdlrobson
, could you please share the percent usage by skin? The SQL results for my
user_properties
view is heavily redacted for obvious reasons.
Jdlrobson
added a comment.
Feb 26 2024, 9:19 PM
2024-02-26 21:19:40 (UTC+0)
Comment Actions
In
T357580#9573239
@Lofhi
wrote:
@Jdlrobson
, could you please share the percent usage by skin?
Hi
@Lofhi
I don't understand your question here. What specifically do you want to know and for which project?
The SQL results for my
user_properties
view is heavily redacted for obvious reasons.
Currently this has to be done by a data analyst as it requires certain permissions. See
T316505
for example.
Jdlrobson
mentioned this in
T331679: Disable automatic sharing of site/user scripts between Vector and Vector 2022 skins
Mar 2 2024, 1:02 AM
2024-03-02 01:02:49 (UTC+0)
Lofhi
added a comment.
Edited
Mar 4 2024, 7:11 AM
2024-03-04 07:11:05 (UTC+0)
Comment Actions
I wanted to know the proportion of the active editors not using Vector (both versions).
I'm inclined to think that active users of older skins would be more likely to be affected by these types of changes, because they're more likely to customize a lot their interface to keep their workflow safe from MediaWiki changes. I have nothing to back this up.
And so just notifying the editors actually concerned by this ticket (so not the old skins users) might be an acceptable solution if we can't find the human resources to review the hundreds of pages between now and the switchover because the disruption could be minimal in average.
Jdlrobson
added a comment.
Mar 4 2024, 4:48 PM
2024-03-04 16:48:32 (UTC+0)
Comment Actions
In
T357580#9594927
@Lofhi
wrote:
I wanted to know the proportion of the active editors not using Vector (both versions).
I'm inclined to think that active users of older skins would be more likely to be affected by these types of changes, because they're more likely to customize a lot their interface to keep their workflow safe from MediaWiki changes. I have nothing to back this up.
Only users of Vector 2022 are impacted by this change. Users using Monobook,Timeless, CologneBlue, Vector, Modern or Minerva are not impacted by this change at all.
Jdlrobson
mentioned this in
T360384: [FYI] Site admins should be aware of change to how site and user scripts load on certain projects
Mar 18 2024, 11:00 PM
2024-03-18 23:00:11 (UTC+0)
Dragoniez
subscribed.
Mar 25 2024, 7:42 PM
2024-03-25 19:42:39 (UTC+0)
Xaosflux
subscribed.
Apr 9 2024, 1:52 PM
2024-04-09 13:52:04 (UTC+0)
Pppery
subscribed.
May 1 2024, 9:23 PM
2024-05-01 21:23:04 (UTC+0)
Comment Actions
Any reason this task is still open?
Jdlrobson
closed this task as
Resolved
May 13 2024, 6:54 PM
2024-05-13 18:54:28 (UTC+0)
Jdlrobson
claimed this task.
Maintenance_bot
edited projects, added
User-notice-archive
; removed
User-notice
May 23 2024, 7:31 PM
2024-05-23 19:31:18 (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