Page MenuHomePhabricator

Temp Accounts: Create a new footer for temp accounts
Closed, ResolvedPublic0.25 Estimated Story Points

Description

Summary

Add a new Footer for temporary accounts that can be customized by the communities.

Background

There are existing footers for IP editors and Registered accounts. It would be good to have a dedicated footer for Temp accounts that can have links relevant to temp accounts. These footers are customizable by the communities and show up at the bottom of Special:Contributions. Some examples:

Technical notes

In ContributionsSpecialPage.php, update this code block to include a new condition and message for temporary accounts:

# Show the appropriate "footer" message - WHOIS tools, etc.
use Wikimedia\IPUtils;

if ( $this->isQueryableRange( $target, $this->getConfig() )
) {
	$message = 'sp-contributions-footer-anon-range';
} elseif ( IPUtils::isIPAddress( $target ) ) {
	$message = 'sp-contributions-footer-anon';
} elseif ( $userObj->isAnon() ) {
	// No message for non-existing users
	$message = '';
} elseif ( $userObj->isHidden() &&
	!$this->permissionManager->userHasRight( $this->getUser(), 'hideuser' )
) {
	// User is registered, but make sure that the viewer can't see them, to avoid
	// having different behavior for missing and hidden users; see T120883
	$message = '';
} else {
	// Not hidden, or hidden but the viewer can still see it
	$message = 'sp-contributions-footer';
}

Acceptance criteria

  • A new footer for temp accounts exists as MediaWiki:Sp-contributions-footer-temp similar to the footer naming for registered editors and IP editors.

Notes

Event Timeline

@Johannnes89 any thoughts about links the footer should come with out of the box?

@Johannnes89 any thoughts about links the footer should come with out of the box?

Thanks for creating the task! Looking at https://en.wikipedia.org/wiki/Special:AllMessages?prefix=Sp-contributions-footer&filter=all&lang=en&limit=50 I don't think there is a default for MediaWiki:Sp-contributions-footer, MediaWiki:Sp-contributions-footer-anon and MediaWiki:Sp-contributions-footer-anon-range? Therefore it might be fine to just allow communities to define a local footer for temporary accounts without showing any footer content per default – or use MediaWiki:Sp-contributions-footer as a fallback for temporary accounts if that message exists and MediaWiki:Sp-contributions-footer-temp doesn't (that's the current behaviour anyway).

If default links are desired, I would go with several xtools links like the ones already present for registered users: local edit statistics (https://xtools.wmcloud.org/ec), global contributions (https://xtools.wmcloud.org/globalcontribs -> important if you want to check a temporary account which is older than 90 days) and pages created (https://xtools.wmcloud.org/pages).

Noting that dewiki temporarily mitigated the issue by changing the footer like this https://de.wikipedia.org/w/index.php?title=MediaWiki%3ASp-contributions-footer&diff=257776575&oldid=257136257 – nevertheless a dedicated footer for temporary accounts would be the preferred solution.

Tchanders set the point value for this task to 0.25.Jul 23 2025, 2:34 PM

Change #1172329 had a related patch set uploaded (by Mszwarc; author: Mszwarc):

[mediawiki/core@master] Special:Contributions: Separate footer for temp accounts

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

kostajh added a project: User-notice.
kostajh subscribed.

I think this is straightforward enough to not need QA time.

@Johannnes89 with MW-1.45-notes (1.45.0-wmf.12; 2025-07-29) there will be a new footer message sp-contributions-footer-temp that can be overridden for temporary accounts.

Suggested text for tech news:

It's now possible to override the footer message shown for temporary accounts on Special:Contributions, via the MediaWiki:Sp-contributions-footer-temp message.

Change #1172329 merged by jenkins-bot:

[mediawiki/core@master] Special:Contributions: Separate footer for temp accounts

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

I think this is straightforward enough to not need QA time.

@Johannnes89 with MW-1.45-notes (1.45.0-wmf.12; 2025-07-29) there will be a new footer message sp-contributions-footer-temp that can be overridden for temporary accounts.

Suggested text for tech news:

It's now possible to override the footer message shown for temporary accounts on Special:Contributions, via the MediaWiki:Sp-contributions-footer-temp message.

@sgrabarczuk For your attention ^

Could we default to using sp-contributions-footer on wikis that don't define an override for sp-contributions-footer-temp? That way, we don't have to edit 900 wikis and create a duplicate (to then maintain and remember) just to restore the status quo behaviour, where the default account links suffice for both registered accounts and temp accounts, and would certainly be preferred over displaying nothing.

As-is, when this change is deployed, both the anon and registered user footer will go away on Special:Contributions when querying for a temp user, with nothing there in its stead but a blank space.

This can switched via the Message::isDisabled() mechanism we use in other places for the same purpose already. Note that we don't do this for sp-contributions-footer-anon-range because its parameter is syntactically incompatible, but Temp users and Registered user names are syntactically compatible.

Could we default to using sp-contributions-footer on wikis that don't define an override for sp-contributions-footer-temp? That way, we don't have to edit 900 wikis and create a duplicate (to then maintain and remember) just to restore the status quo behaviour, where the default account links suffice for both registered accounts and temp accounts, and would certainly be preferred over displaying nothing.

As-is, when this change is deployed, both the anon and registered user footer will go away on Special:Contributions when querying for a temp user, with nothing there in its stead but a blank space.

This can switched via the Message::isDisabled() mechanism we use in other places for the same purpose already. Note that we don't do this for sp-contributions-footer-anon-range because its parameter is syntactically incompatible, but Temp users and Registered user names are syntactically compatible.

That seems reasonable to me, although would we want to fallback to sp-contributions-footer-anon rather than sp-contributions-footer if sp-contributions-footer-temp is not defined? @Niharika what do you think?

would we want to fallback to sp-contributions-footer-anon rather than sp-contributions-footer if sp-contributions-footer-temp is not defined?

The footer-anon expects usually that $1 is an IP address (eg. enwiki), so many wikis use it to link to whois/geoip services, which are incompatible with usernames.

Change #1174666 had a related patch set uploaded (by Mszwarc; author: Mszwarc):

[mediawiki/core@master] Special:Contributions: Fallback footer for temp. accounts

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

Change #1174666 merged by jenkins-bot:

[mediawiki/core@master] Special:Contributions: Fallback footer for temp. accounts

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

Could we default to using sp-contributions-footer on wikis that don't define an override for sp-contributions-footer-temp? That way, we don't have to edit 900 wikis and create a duplicate (to then maintain and remember) just to restore the status quo behaviour, where the default account links suffice for both registered accounts and temp accounts, and would certainly be preferred over displaying nothing.

As-is, when this change is deployed, both the anon and registered user footer will go away on Special:Contributions when querying for a temp user, with nothing there in its stead but a blank space.

This can switched via the Message::isDisabled() mechanism we use in other places for the same purpose already. Note that we don't do this for sp-contributions-footer-anon-range because its parameter is syntactically incompatible, but Temp users and Registered user names are syntactically compatible.

Have we addressed this issue yet? Should we do that in a different ticket instead?

Could we default to using sp-contributions-footer on wikis that don't define an override for sp-contributions-footer-temp? That way, we don't have to edit 900 wikis and create a duplicate (to then maintain and remember) just to restore the status quo behaviour, where the default account links suffice for both registered accounts and temp accounts, and would certainly be preferred over displaying nothing.

As-is, when this change is deployed, both the anon and registered user footer will go away on Special:Contributions when querying for a temp user, with nothing there in its stead but a blank space.

This can switched via the Message::isDisabled() mechanism we use in other places for the same purpose already. Note that we don't do this for sp-contributions-footer-anon-range because its parameter is syntactically incompatible, but Temp users and Registered user names are syntactically compatible.

Have we addressed this issue yet? Should we do that in a different ticket instead?

Yes, it was implemented in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1174666

Could we default to using sp-contributions-footer on wikis that don't define an override for sp-contributions-footer-temp? That way, we don't have to edit 900 wikis and create a duplicate (to then maintain and remember) just to restore the status quo behaviour, where the default account links suffice for both registered accounts and temp accounts, and would certainly be preferred over displaying nothing.

As-is, when this change is deployed, both the anon and registered user footer will go away on Special:Contributions when querying for a temp user, with nothing there in its stead but a blank space.

This can switched via the Message::isDisabled() mechanism we use in other places for the same purpose already. Note that we don't do this for sp-contributions-footer-anon-range because its parameter is syntactically incompatible, but Temp users and Registered user names are syntactically compatible.

Have we addressed this issue yet? Should we do that in a different ticket instead?

Yes, it was implemented in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1174666

Oh I missed that. Thanks for point that out.