Page MenuHomePhabricator

Regression: Syntax error in Vector gadget API for portlets and older browsers
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

NOTE: Raised on VPT

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

  • Use a device running any version of iOS 12 (iPhone 6, etc)
  • Access any Wikimedia site using the latest version of Mediawiki
  • Log in to the desktop site (tested with Vector 2010 and Vector 2022)
  • Attempt to use a user script

What happens?:
All user scripts (those in common.js, as well as enabled through Preferences) do not load or run.

What should have happened instead?:
User scripts should load and run.

Other information (browser name/version, screenshots, etc.):
The issue was introduced in the MediaWiki update yesterday.
Browser: Safari on iOS 12, tested on iPhone 6 and iPad 5
The issue does not occur on the other browsers I tested (latest Firefox on macOS Ventura, and latest Chrome on Windows 10).
screenshots:

0568C0AF-78D9-4C9F-8ADC-52D2AD0AC9FD.png (1×2 px, 574 KB)

Search previews do not load, either
6BB9411E-BE0E-41F6-91C7-2F861C781AFC.png (1×2 px, 436 KB)

User scripts not loading in the "More" tab, and no Twinkle tab appears
my common.js

Event Timeline

Can't reproduce personally; is it working for you now? Have you tried bypassing your cache?

I deleted my cache and cookies (there's no way to bypass cache on iOS), the issue was not resolved. Are you using iOS 12?

This issue might be disabling all JavaScript, not just user scripts; I'm not sure. All custom CSS still works.

This issue does not affect the mobile site.

@Jdlrobson this is a task that goes with https://en.wikipedia.org/wiki/WP:VPT#Editor_stopped_working , but I don't think it's the same issue as the one described by the OP of that section (who was having their issue in Firefox 119).

It's gerrit:963165 and gerrit:967991. ??, the nullish coalescing operator, is from ES2020, so I'm at a loss as to how this got in (@Jdlrobson and Jon (WMF)). Nardog (talk) 08:27, 5 November 2023 (UTC)

Is the relevant line.

Jdlrobson renamed this task from User scripts no longer work on iOS 12 (desktop site) to Syntax error in Vector gadget API for portlets.Nov 5 2023, 7:35 PM
Jdlrobson triaged this task as High priority.

I will get this fixed and backported on Monday.

Jdlrobson renamed this task from Syntax error in Vector gadget API for portlets to Regression: Syntax error in Vector gadget API for portlets and older browsers.Nov 6 2023, 4:37 PM
Jdlrobson added a project: Regression.

Change 971997 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] Avoid nullish coalescing operators

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

Change 971997 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Avoid nullish coalescing operators

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

Change 972029 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@wmf/1.42.0-wmf.3] Avoid nullish coalescing operators

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

Change 972029 merged by jenkins-bot:

[mediawiki/skins/Vector@wmf/1.42.0-wmf.3] Avoid nullish coalescing operators

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

Mentioned in SAL (#wikimedia-operations) [2023-11-06T21:30:35Z] <cjming@deploy2002> Started scap: Backport for [[gerrit:972029|Avoid nullish coalescing operators (T350519)]]

Mentioned in SAL (#wikimedia-operations) [2023-11-06T21:31:50Z] <cjming@deploy2002> jdlrobson and cjming: Backport for [[gerrit:972029|Avoid nullish coalescing operators (T350519)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2023-11-06T21:45:44Z] <cjming@deploy2002> Finished scap: Backport for [[gerrit:972029|Avoid nullish coalescing operators (T350519)]] (duration: 15m 09s)

Can skip QA since it's difficult to test. Will sign off once we've had confirmation on Village technical pump.

Izno assigned this task to Jdlrobson.

Confirmed onwiki to be fixed.