Page MenuHomePhabricator

[subtask] Problem in Legacy Vector calculation ([{reqId}] {exception_url} PHP Notice: Undefined index: data-user-page )
Closed, ResolvedPublicBUG REPORT

Description

Add the following config

$wgVectorDefaultSkinVersion = '1';
$wgVectorSkinMigrationMode = false;

Incognito visit http://localhost:8888/w/index.php/Selenium_category_test?useskin=vector-2022

See: notice, incorrectly styled search and uncollapsed user dropdown.

Developer notes

This happens because Hooks::isSkinVersionLegacy() returns true in this situation.

SkinVersionLookup::getVersion returns 1

This also causes a production error https://logstash.wikimedia.org/goto/d7565ceb716e44e47aab1a7b7df6febb

Event Timeline

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

[mediawiki/skins/Vector@master] Fix bug in SkinVersionLookup

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

Jdlrobson renamed this task from Problem in Legacy Vector calculation ([{reqId}] {exception_url} PHP Notice: Undefined index: data-user-page ) to [subtask] Problem in Legacy Vector calculation ([{reqId}] {exception_url} PHP Notice: Undefined index: data-user-page ).Jan 24 2022, 9:35 PM
Jdlrobson triaged this task as High priority.

Change 756672 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Fix bug in SkinVersionLookup

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

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

[mediawiki/skins/Vector@wmf/1.38.0-wmf.18] Fix bug in SkinVersionLookup

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

Change 756696 merged by jenkins-bot:

[mediawiki/skins/Vector@wmf/1.38.0-wmf.18] Fix bug in SkinVersionLookup

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

Mentioned in SAL (#wikimedia-operations) [2022-01-26T01:00:56Z] <catrope@deploy1002> Synchronized php-1.38.0-wmf.18/skins/Vector/: Backport: [[gerrit:756997|Do not load common.js twice (T300070)]] and [[gerrit:756696|Fix bug in SkinVersionLookup (T299971)]] (duration: 00m 51s)

No longer seeing an exception on https://en.wikipedia.org?useskin=vector-2022 in incognito window.

Apparently this is not fixed in wmf19 .

Weird. The patch is in the wmf19 branch so the fix may not have worked.

The issue appears limited to desktop improvements wiki. I think it must relate to T300757 somehow.

This only seems to be possible if:

  • VectorSkin::isLegacy() is returning false.
  • Hooks::isSkinVersionLegacy() is returning true

I'm trying to work out under what scenario this would happen.

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

[mediawiki/skins/Vector@master] Pass skin name to Hooks::isSkinLegacy

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

Change 759343 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Pass skin name to Hooks::isSkinLegacy

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

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

[mediawiki/skins/Vector@wmf/1.38.0-wmf.19] Pass skin name to Hooks::isSkinLegacy

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

Change 759309 merged by jenkins-bot:

[mediawiki/skins/Vector@wmf/1.38.0-wmf.19] Pass skin name to Hooks::isSkinLegacy

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

Mentioned in SAL (#wikimedia-operations) [2022-02-03T00:44:46Z] <brennen@deploy1002> Started scap: Backports: [[gerrit:759308|Changes the labels of the Vector skins (T299927)]] and [[gerrit:759309|Pass skin name to Hooks::isSkinLegacy (T299971)]]

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

[mediawiki/skins/Vector@wmf/1.38.0-wmf.20] Pass skin name to Hooks::isSkinLegacy

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

Mentioned in SAL (#wikimedia-operations) [2022-02-03T01:09:35Z] <brennen@deploy1002> Finished scap: Backports: [[gerrit:759308|Changes the labels of the Vector skins (T299927)]] and [[gerrit:759309|Pass skin name to Hooks::isSkinLegacy (T299971)]] (duration: 24m 48s)

Jdlrobson lowered the priority of this task from High to Medium.Feb 3 2022, 1:10 AM

I believe the impact on users is that they are not seeing icons on modern Vector:

image.png (1×2 px, 572 KB)

While I couldn't replicate, it looks like this was possible if $wgFullyInitialised = false at the time the hook is run, but is true, at the time the skin generates.

We backported https://gerrit.wikimedia.org/r/759309 to wmf19 and the errors seem to have disappeared.

We can backport that to wmf20 tomorrow if the errors resurface.

The issue is still on wmf20 so I'll look to fix that tomorrow.

Change 759310 merged by jenkins-bot:

[mediawiki/skins/Vector@wmf/1.38.0-wmf.20] Pass skin name to Hooks::isSkinLegacy

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

Mentioned in SAL (#wikimedia-operations) [2022-02-03T19:34:23Z] <taavi@deploy1002> Synchronized php-1.38.0-wmf.20/skins/Vector/includes/Hooks.php: Backport: [[gerrit:759310|Pass skin name to Hooks::isSkinLegacy (T299971)]] (duration: 00m 49s)

Errors look like they've completely disappeared from wmf20. I'll close later today, after the roll out of the train provided they don't come back.

Error has disappeared as expected