Page MenuHomePhabricator

⧼userpage⧽ shows up in vector sticky header user menu
Closed, ResolvedPublicBUG REPORT

Description

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

  • Ensure "Default to newcomer homepage from username link in personal tools" option is enabled in the settings
  • Go to any page using skin Vector 2022, for example https://en.wikipedia.org/wiki/Yang_Guifei?useskin=vector-2022
  • Scroll down until header is replaced with sticky header
  • Click user icon top right of the window

What happens?: a ⧼userpage⧽ link with no icon and no text appears, linking to Special:Homepage

What should have happened instead?:
No link

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

image.png (729×1 px, 496 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Sgs added subscribers: Jdlrobson, Sgs.

Thanks for reporting. Not sure Growth is the best equipped to fix this but we can look into it. Is this maybe a fallout of rSVEC946bc65ff9b7e07b1acc4831697430ce47df5957 @Jdlrobson?

You can also see it in Monobook https://en.wikipedia.org/wiki/Yang_Guifei?useskin=monobook

This was broken earlier in rMW962ad3329b12

This is what GE is doing:

if ( $this->userHasPersonalToolsPrefEnabled( $user ) ) {
    $links['user-menu']['userpage']['href'] = $this->getPersonalToolsHomepageLinkUrl(
	$skin->getTitle()->getNamespace()
    );
    $links['user-page']['userpage']['href'] = $this->getPersonalToolsHomepageLinkUrl(
	$skin->getTitle()->getNamespace()
    );
   // Make the link blue
   unset( $links['user-menu']['userpage']['link-class'] );
   // Remove the "this page doesn't exist" part of the tooltip
   $links['user-menu']['userpage' ]['exists'] = true;
}

This worked fine before, but the GE extension now needs to be fixed so it doesn’t write to both keys (since it doesn’t know whether both exist and doesn’t check). Writing to a non-existent key creates the duplicate link here.

Change #1230901 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@master] fix: avoid displaying incorrect additional userpage link

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

Thanks for the directions @Ammarpad, I've submitted a fix. My understanding is that SkinTemplate is now handling the re-use of whatever user-page is set into the user menu, so for GE it should suffice to rewrite only the user-page url and let MW do the rest.

Sgs triaged this task as High priority.Fri, Jan 23, 10:51 AM
Sgs moved this task from Needs Prioritization to FY2025-26 Q3 Sprint 1 on the Growth-Team board.
Sgs edited projects, added Growth-Team (FY2025-26 Q3 Sprint 1); removed Growth-Team.
Sgs moved this task from Incoming to Code Review on the Growth-Team (FY2025-26 Q3 Sprint 1) board.

Change #1230901 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] fix: avoid displaying incorrect additional userpage link

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

Change #1233117 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/GrowthExperiments@wmf/1.46.0-wmf.12] fix: avoid displaying incorrect additional userpage link

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

Change #1233117 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.46.0-wmf.12] fix: avoid displaying incorrect additional userpage link

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

Mentioned in SAL (#wikimedia-operations) [2026-01-26T14:32:27Z] <sgimeno@deploy2002> Started scap sync-world: Backport for [[gerrit:1233116|fix: avoid logging traffic from overridden experiment users (T415294)]], [[gerrit:1233117|fix: avoid displaying incorrect additional userpage link (T415291)]]

Mentioned in SAL (#wikimedia-operations) [2026-01-26T14:34:34Z] <sgimeno@deploy2002> sgimeno: Backport for [[gerrit:1233116|fix: avoid logging traffic from overridden experiment users (T415294)]], [[gerrit:1233117|fix: avoid displaying incorrect additional userpage link (T415291)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-01-26T14:39:21Z] <sgimeno@deploy2002> Finished scap sync-world: Backport for [[gerrit:1233116|fix: avoid logging traffic from overridden experiment users (T415294)]], [[gerrit:1233117|fix: avoid displaying incorrect additional userpage link (T415291)]] (duration: 06m 54s)