Page MenuHomePhabricator

accountJustCreated flag not properly added on WelcomeSurvey redirections
Closed, ResolvedPublic

Description

@Milimetric reported that the $returnToQuery = 'accountJustCreated=1'; code added in rEGREa1df3b881a8638071d180a38a8994de02a663909 is buggy and he’s not able to get a wgTKAccountJustCreated = "1"  on the first page load after account creation.

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

  • Go to Special:CreateAccount in testwiki (make sure no returnto param is present in the URL)
  • Place a breakpoint on line 7 of WikimediaEvents/modules/ext.wikimediaEvents/accountCreation.js  where we check mw.config.get( 'wgTKAccountJustCreated' )
  • Observe null , the correct value should be "1"

What happens?:
There's no "account just created" signal on the first page load (Special:WelcomeSurvey) after account creation

What should have happened instead?:

mw.config.get( 'wgTKAccountJustCreated' ) should be set with a value of "1"

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Introduced in wmf/1.46.0-wmf.19

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

Event Timeline

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

[mediawiki/extensions/GrowthExperiments@master] fix(WelcomeSurveyHooks): ensure accountJustCreated is always added

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

Sgs triaged this task as High priority.Mar 20 2026, 12:34 PM
Sgs moved this task from Incoming to Code Review on the Growth-Team (FY2025-26 Q3 Sprint 5) board.

Change #1256373 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] fix(WelcomeSurveyHooks): ensure accountJustCreated is always added

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

Change #1256489 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/GrowthExperiments@master] tests: add coverage for WelcomeSurveyHooks::onCentralAuthPostLoginRedirect

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

Change #1256514 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/GrowthExperiments@master] fix(WelcomeSurveyHooks): ensure accountJustCreated is always added 2

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

Change #1256489 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] tests: add coverage for WelcomeSurveyHooks::onCentralAuthPostLoginRedirect

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

Change #1256514 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] fix(WelcomeSurveyHooks): ensure accountJustCreated is always added 2

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

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

[mediawiki/extensions/GrowthExperiments@wmf/1.46.0-wmf.20] fix(WelcomeSurveyHooks): ensure accountJustCreated is always added

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

Change #1259036 had a related patch set uploaded (by Sergio Gimeno; author: Michael Große):

[mediawiki/extensions/GrowthExperiments@wmf/1.46.0-wmf.20] tests: add coverage for WelcomeSurveyHooks::onCentralAuthPostLoginRedirect

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

Change #1259036 abandoned by Sergio Gimeno:

[mediawiki/extensions/GrowthExperiments@wmf/1.46.0-wmf.20] tests: add coverage for WelcomeSurveyHooks::onCentralAuthPostLoginRedirect

Reason:

merge conflicts, wrong base

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

Change #1259036 restored by Sergio Gimeno:

[mediawiki/extensions/GrowthExperiments@wmf/1.46.0-wmf.20] tests: add coverage for WelcomeSurveyHooks::onCentralAuthPostLoginRedirect

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

Change #1259046 had a related patch set uploaded (by Sergio Gimeno; author: Michael Große):

[mediawiki/extensions/GrowthExperiments@wmf/1.46.0-wmf.20] fix(WelcomeSurveyHooks): ensure accountJustCreated is always added 2

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

Change #1259072 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/GrowthExperiments@master] fix(WelcomeSurveyHooks): ensure accountJustCreated is added once

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

Change #1259073 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/WikimediaEvents@master] AccountCreationHandler: add accountJustCreated url param once

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

Change #1259035 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.46.0-wmf.20] fix(WelcomeSurveyHooks): ensure accountJustCreated is always added

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

Change #1259036 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.46.0-wmf.20] tests: add coverage for WelcomeSurveyHooks::onCentralAuthPostLoginRedirect

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

Change #1259046 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.46.0-wmf.20] fix(WelcomeSurveyHooks): ensure accountJustCreated is always added 2

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

Mentioned in SAL (#wikimedia-operations) [2026-03-23T13:05:55Z] <sgimeno@deploy2002> Started scap sync-world: Backport for [[gerrit:1259035|fix(WelcomeSurveyHooks): ensure accountJustCreated is always added (T420722)]], [[gerrit:1259036|tests: add coverage for WelcomeSurveyHooks::onCentralAuthPostLoginRedirect (T420722)]], [[gerrit:1259046|fix(WelcomeSurveyHooks): ensure accountJustCreated is always added 2 (T420722)]]

Mentioned in SAL (#wikimedia-operations) [2026-03-23T13:07:42Z] <sgimeno@deploy2002> sgimeno: Backport for [[gerrit:1259035|fix(WelcomeSurveyHooks): ensure accountJustCreated is always added (T420722)]], [[gerrit:1259036|tests: add coverage for WelcomeSurveyHooks::onCentralAuthPostLoginRedirect (T420722)]], [[gerrit:1259046|fix(WelcomeSurveyHooks): ensure accountJustCreated is always added 2 (T420722)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Ch

Mentioned in SAL (#wikimedia-operations) [2026-03-23T13:17:39Z] <sgimeno@deploy2002> Finished scap sync-world: Backport for [[gerrit:1259035|fix(WelcomeSurveyHooks): ensure accountJustCreated is always added (T420722)]], [[gerrit:1259036|tests: add coverage for WelcomeSurveyHooks::onCentralAuthPostLoginRedirect (T420722)]], [[gerrit:1259046|fix(WelcomeSurveyHooks): ensure accountJustCreated is always added 2 (T420722)]] (duration: 11m 43s)

Change #1259072 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] fix(WelcomeSurveyHooks): ensure accountJustCreated is added once

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

Change #1259073 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] AccountCreationHandler: add accountJustCreated url param once

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

Etonkovidova subscribed.

Tested on testwiki wmf.22 - seems to be working as expected.
Note: Technically, testwiki doesn't have Create Account page. When Special:Create Account page is searched, it redirects to
https:auth.wikimedia.org/testwiki/w/index.php?title=Special:CreateAccount