Page MenuHomePhabricator

[subtask] SyntaxError: Element.closest: '#mw-content-text a[href][title]:not(.extiw, .mw-selflink, .image, .new, .internal, .external, .mw-cite-backlink a, .oo-ui-buttonedElement-button, .ve-ce-surface a, .cancelLink a), #mw-content-text .reference a[ href*="#" ]' is not a valid selector
Closed, ResolvedPublicBUG REPORT

Description

Caused by T325007

The use of closest will throw a SyntaxError on browsers that do not support the not selector with multiple arguments.

This is causing a huge amount of JS errors (around 150k in the last hour alone) and means the page previews feature is unusable to older browsers.

Screen Shot 2022-12-13 at 2.18.39 PM.png (351×645 px, 43 KB)

https://grafana.wikimedia.org/d/000000566/overview?orgId=1&from=1670884156220&to=1670969903151

QA Results - Prod

ACStatusDetails
1T325113#8473043

Event Timeline

Jdlrobson renamed this task from SyntaxError: Element.closest: '#mw-content-text a[href][title]:not(.extiw, .mw-selflink, .image, .new, .internal, .external, .mw-cite-backlink a, .oo-ui-buttonedElement-button, .ve-ce-surface a, .cancelLink a), #mw-content-text .reference a[ href*="#" ]' is not a valid selector to [subtask] SyntaxError: Element.closest: '#mw-content-text a[href][title]:not(.extiw, .mw-selflink, .image, .new, .internal, .external, .mw-cite-backlink a, .oo-ui-buttonedElement-button, .ve-ce-surface a, .cancelLink a), #mw-content-text .reference a[ href*="#" ]' is not a valid selector.Dec 13 2022, 10:10 PM
Jdlrobson triaged this task as Unbreak Now! priority.
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)

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

[mediawiki/extensions/Popups@master] Account for syntax errors in closest selector

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

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

[mediawiki/extensions/Popups@wmf/1.40.0-wmf.13] Account for syntax errors in closest selector

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

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

[mediawiki/extensions/Popups@wmf/1.40.0-wmf.14] Account for syntax errors in closest selector

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

Change 867720 merged by jenkins-bot:

[mediawiki/extensions/Popups@master] Account for syntax errors in closest selector

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

Change 867617 merged by jenkins-bot:

[mediawiki/extensions/Popups@wmf/1.40.0-wmf.13] Account for syntax errors in closest selector

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

Mentioned in SAL (#wikimedia-operations) [2022-12-13T22:33:11Z] <jdrewniak@deploy1002> Started scap: Backport for [[gerrit:867617|Account for syntax errors in closest selector (T325113)]]

Mentioned in SAL (#wikimedia-operations) [2022-12-13T22:34:58Z] <jdrewniak@deploy1002> jdrewniak and jdlrobson: Backport for [[gerrit:867617|Account for syntax errors in closest selector (T325113)]] synced to the testservers: mwdebug1001.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2022-12-13T22:42:31Z] <jdrewniak@deploy1002> Finished scap: Backport for [[gerrit:867617|Account for syntax errors in closest selector (T325113)]] (duration: 09m 20s)

Change 867618 merged by jenkins-bot:

[mediawiki/extensions/Popups@wmf/1.40.0-wmf.14] Account for syntax errors in closest selector

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

Mentioned in SAL (#wikimedia-operations) [2022-12-13T22:48:57Z] <jdrewniak@deploy1002> Started scap: Backport for [[gerrit:867618|Account for syntax errors in closest selector (T325113)]]

Mentioned in SAL (#wikimedia-operations) [2022-12-13T22:50:49Z] <jdrewniak@deploy1002> jdrewniak and jdlrobson: Backport for [[gerrit:867618|Account for syntax errors in closest selector (T325113)]] synced to the testservers: mwdebug2002.codfw.wmnet, mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug1002.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2022-12-13T22:57:26Z] <jdrewniak@deploy1002> Finished scap: Backport for [[gerrit:867618|Account for syntax errors in closest selector (T325113)]] (duration: 08m 29s)

Jdlrobson lowered the priority of this task from Unbreak Now! to High.Dec 13 2022, 11:11 PM
Jdlrobson added a subscriber: Jdrewniak.

Thanks to @Jdrewniak this is backported now. The graph is starting to recover

Screen Shot 2022-12-13 at 3.11.08 PM.png (732×1 px, 82 KB)

Edtadros subscribed.

Test Result - Prod

Status: ✅ PASS
Environment:
OS: macOS Ventura
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: Verify errors have returned to normal levels after the backport on 12/13.

Screenshot 2022-12-15 at 6.58.28 PM.png (346×1 px, 70 KB)