Page MenuHomePhabricator

Links in `anoneditwarning` are missing the `returnToQuery` parameters
Closed, ResolvedPublic

Description

In most wikis, there's a warning message above the editor when trying to edit a page anonymously. The message has "login" and "create account" links as $1 and $2.

Those links, unlike the two similar links in the personal tools bar in the top right corner, don't have the returnToQuery parameter. Therefore, those links won't redirect the user to the editing context.

See EditPage.php:3149

Event Timeline

SBisson created this task.Nov 7 2018, 7:55 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 7 2018, 7:55 PM

@SBisson: Could you please also add a code project tag, if possible? Thanks!

Change 473649 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/core@master] EditPage: Add returntoquery parameter to anoneditwarning links

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

@Catrope -- in our triage meeting, we decided that weren't 100% sure we wanted to just take action on this, since we would be simultaneously changing the experience in hundreds of wikis. We want to get @Trizek-WMF's opinion on whether we should make this change, discuss with communities, or something else.

Trizek-WMF added a comment.EditedNov 15 2018, 1:22 PM

@MMiller_WMF, I've discussed about that with Catrope and the conclusion was to make the change since the local overrides have the priority.

We should document the need of this change and publicise it (using User-notice and Tech-Ambassadors) to have the communities to think about it.

Catrope added subscribers: Urbanecm, revi.EditedNov 15 2018, 11:43 PM

Once this change is deployed (most likely in late November), $1 will be the URL of the login page with the right parameters set, and $2 will be the URL of the signup page. Right now these parameters are already available, but they only have returnto set, not returntoquery (meaning you get sent back to the read version of the page after logging in, not to the editor).

@revi: On Korean Wikipedia, the custom anoneditwarning message uses [[특수:로그인|로그인]] for the login link, and [{{fullurl:특수:로그인/signup|returnto={{FULLPAGENAMEE}}&returntoquery=action%3Dedit}} 계정을 만들면] for the signup link. Once this change is deployed, those can be changed to [$1 로그인] and [$2 계정을 만들면] respectively (and this will make the login link go back to the edit page, which is currently doesn't).

@Urbanecm: On Czech Wikipedia, the custom anoneditwarning message is very outdated. It was customized in 2006, last edited in 2007, and differs a lot from the default message in MediaWiki. You may want to consider deleting or updating the override. Either way, [[Speciální:Userlogin|přihlášen(a)]] should be changed to [$1 přihlášen(a)]; there is no signup link in the current override, but if you add one it should look like [$2 link text].

revi moved this task from Incoming to Doing on the User-revi board.
SBisson assigned this task to Catrope.Nov 16 2018, 4:10 PM
SBisson moved this task from Incoming to QA on the Growth-Team (Current Sprint) board.

The Core patch that adds returnToQuery to the links parameters is merged. It can be tested by inspecting those links on a wiki that does NOT override anoneditwarning in the MediaWiki namespace.

Change 473649 merged by jenkins-bot:
[mediawiki/core@master] EditPage: Add returntoquery parameter to anoneditwarning links

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

@Urbanecm: On Czech Wikipedia, the custom anoneditwarning message is very outdated. It was customized in 2006, last edited in 2007, and differs a lot from the default message in MediaWiki. You may want to consider deleting or updating the override. Either way, [[Speciální:Userlogin|přihlášen(a)]] should be changed to [$1 přihlášen(a)]; there is no signup link in the current override, but if you add one it should look like [$2 link text].

I deleted the customized version. The only thing it changed is it encapsulated the message to a div with custom class to make the message look more prettier. As MW does that on its own now, it is no longer necessary. If I should do anything else, let me know.

Hi, is this change deployed? Since I'm not sure... :-)

@revi: See above: Merged in (1.33.0-wmf.6; 2018-11-27) vs https://tools.wmflabs.org/versions/

<_<, thanks, Andre!

Changes deployed.

</workhat>

Change 474675 had a related patch set uploaded (by Sbisson; owner: Catrope):
[mediawiki/core@wmf/1.33.0-wmf.4] EditPage: Add returntoquery parameter to anoneditwarning links

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

Change 474675 abandoned by Sbisson:
EditPage: Add returntoquery parameter to anoneditwarning links

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

Changes deployed.

@revi, the change won't be live for another 2 weeks or so. Maybe wait a little before changing this message?

@revi, the change won't be live for another 2 weeks or so. Maybe wait a little before changing this message?

Hoping the fact I deleted the old version isn't problematic in any mean.

Hoping the fact I deleted the old version isn't problematic in any mean.

I don't think it's a problem for cswiki since the returnToQuery parameter wasn't there in the local override.

Etonkovidova closed this task as Resolved.Nov 26 2018, 9:12 PM
revi moved this task from Doing to Closed on the User-revi board.Nov 27 2018, 4:20 PM