Page MenuHomePhabricator

GlobalContributions: Ensure that the link from the sidebar and other contributions pages always leads to the central wiki
Closed, ResolvedPublic

Description

Summary

As described in T384010#10505638, links to Special:GlobalContributions from other contributions pages often lead to a nonexistent page error.

Background

We added links to Special:GlobalContributions from other contributions pages in T384010. Currently the links are always added. However, Special:GlobalContributions does not always exist.

Conditions for Special:GlobalContributions existing:

  • Temporary accounts are known to the wiki
  • GlobalPreferences extension is loaded
  • CentralAuth extension is loaded
  • (CheckUser extension must also be loaded, but the links are added via this extension, so we can ignore this condition when deciding whether to add links.)

User story

As a patroller who is looking at a user's contributions on some wiki, I want to see their contributions to all wikis.

Technical notes

The user story is being met on wikis that know about temporary accounts.

For wikis that don't know about temporary accounts, here's what's happening:

  • Special:GlobalContributions isn't defined via onSpecialPage_initList: (code)
  • The link is still added via onContributionsToolLinks: (code)
  • When the user clicks on the link, they get a non-existent page error

Acceptance criteria

On a wikifarm where wikis are configured to redirect Special:GlobalContributions to a central wiki:

  • The link to global contributions is added to contributions pages (when a target is defined) on all wikis with CentralAuth and GlobalPreferences
  • The link to global contributions is added to the sidebar (on User and User Talk pages) on all wikis with CentralAuth and GlobalPreferences
  • Clicking the link loads Special:GlobalContributions (for the relevant target), at the central wiki

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Temporary accounts are known to the wiki

Should we remove this requirement? I had thought it was removed as part of implementing GUC for named accounts, but I was mistaken. I think it would be useful for wikis without the feature to have it so that they can get used to using the tool on named users and find bugs with it before we deploy to more wikis.

Furthermore, it solves the issue with the redirect as the page exists.

Temporary accounts are known to the wiki

Should we remove this requirement? I had thought it was removed as part of implementing GUC for named accounts, but I was mistaken. I think it would be useful for wikis without the feature to have it so that they can get used to using the tool on named users and find bugs with it before we deploy to more wikis.

Furthermore, it solves the issue with the redirect as the page exists.

I agree, I think that's the best way to solve this.

Temporary accounts are known to the wiki

Should we remove this requirement? I had thought it was removed as part of implementing GUC for named accounts, but I was mistaken. I think it would be useful for wikis without the feature to have it so that they can get used to using the tool on named users and find bugs with it before we deploy to more wikis.

Furthermore, it solves the issue with the redirect as the page exists.

I agree, I think that's the best way to solve this.

...Except it looks as though we first need to make sure Special:GlobalContributions works properly for an IP address target if temp accounts are not enabled. There might be some product decisions to be made around what the page does if temp accounts are not known and the target is an IP.

At the moment if I just comment out the dependency that GlobalContributions has on temp accounts being known, it either throws an error, if there are results:

image.png (1,146×337 px, 71 KB)

or, if there are no results, displays an error about temp accounts permissions, which doesn't make sense where temp accounts aren't known:

image.png (1,121×269 px, 41 KB)

Perhaps first we should make sure the link is not shown unless temp accounts is enabled, while we figure that out.

Temporary accounts are known to the wiki

Should we remove this requirement? I had thought it was removed as part of implementing GUC for named accounts, but I was mistaken. I think it would be useful for wikis without the feature to have it so that they can get used to using the tool on named users and find bugs with it before we deploy to more wikis.

Furthermore, it solves the issue with the redirect as the page exists.

I agree, I think that's the best way to solve this.

Perhaps first we should make sure the link is not shown unless temp accounts is enabled, while we figure that out.

Perhaps we can file a follow-up task for making the page work when temporary accounts are not known and add it to the sprint / next sprint? I would like to still see this happen, for the reason of getting users used to the page when temporary accounts are not yet known on their wiki.

Alternately, if we want to redirect the user to the central wiki, then perhaps we still enable Special:GlobalContributions when temporary accounts are not known as long as we have a central wiki to redirect to? Then it would also allow wikilinks to work which point to the local version of the special page.

On a second look, it seems that the redirect to the central wiki should already be occuring,

$wgCheckUserGlobalContributionsCentralWikiId is set on WMF wikis and should cause all visitors to the GUC page on any wiki other than metawiki to go to metawiki. Is this logic broken? Maybe the logic fails if the special page isn't defined, so we need to define it to perform the redirect?

The problem is that the nonexistent page error occurs before the redirect. I think checking for the redirect if temp accounts are not known (T385086#10508838) could work though.

Was T384010 supposed to add the link on all Wikis or only on some? Cause I don't see it on a few (Simple, English, German).

Was T384010 supposed to add the link on all Wikis or only on some? Cause I don't see it on a few (Simple, English, German).

The link was added in the most recent version of MediaWiki (1.44.0-wmf.14), which is not running on all sites yet, including those wikis. There are more details about which sites are on which versions here: https://versions.toolforge.org/

Change #1115463 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/CheckUser@master] GlobalContributions: Load page if there is a redirect wiki

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

Change #1115467 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/CheckUser@master] GlobalContributions: Add link only if global contributions exists

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

Change #1115467 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] GlobalContributions: Add link only if global contributions exists

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

Change #1115463 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] GlobalContributions: Load page if there is a redirect wiki

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

What will be the effect of this task after temp accounts are rolled out everywhere? Will people still be directed to the central wiki or will they see the page on their home wiki?

I'm asking because this redirect will mean that:

  • people by default will see the page in English instead of their language;
  • already-set preferences will not take effect -- e.g. format of displaying dates (incl. timezones), light/dark mode and content width (for Vector 2022) -- I'm not sure how many people set that in their global preferences but rather not many;
  • gadgets and user scripts people are used to will not be loaded;
  • there may be troubles with linking to the page, as one will need to create an interwiki link perhaps using an alphabet/language foreign to them (at least in a scenario like now where the special page does not exist locally);
  • the return path is hard, as all the links in the UI lead to a different wiki than the user went from

@Msz2001 Thanks for sharing this. Is it possible to copy the comment over to T376612, which is the original task for using a central page on metawiki?

@Niharika @KColeman-WMF we should have a think about this.

  • The link to global contributions is added to the sidebar (on User and User Talk pages) on all wikis with CentralAuth and GlobalPreferences

Note that this AC is blocked on T384012: GlobalContributions: Add link to Special:GlobalContributions from sidebar on user pages and user talk pages.

Additionally requirements might change following what was agreed in T380375#10509564.

@Msz2001 Thanks for sharing this. Is it possible to copy the comment over to T376612, which is the original task for using a central page on metawiki?

Copied.

dom_walden subscribed.

Acceptance criteria

On a wikifarm where wikis are configured to redirect Special:GlobalContributions to a central wiki:

  • The link to global contributions is added to contributions pages (when a target is defined) on all wikis with CentralAuth and GlobalPreferences

...

  • Clicking the link loads Special:GlobalContributions (for the relevant target), at the central wiki

For example https://test.wikipedia.org/wiki/Special:Contributions/~2024-12669, clicking "Global Contributions" goes to https://test.wikipedia.org/wiki/Special:GlobalContributions/~2024-12669 which redirects to https://meta.wikimedia.org/wiki/Special:GlobalContributions/~2024-12669.

  • The link to global contributions is added to the sidebar (on User and User Talk pages) on all wikis with CentralAuth and GlobalPreferences

I guess this will be done in T384012.

Closing this task. Discussion about the central wiki can continue on T376612, and the final acceptance criterion has been moved to T384012.