Page MenuHomePhabricator

The extraInput array key in LoginSignupSpecialPage was accidentally lowercased which broke extensions that relied on it.
Closed, DeclinedPublic


Event Timeline

Alexia created this task.Apr 10 2018, 9:52 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 10 2018, 9:52 PM

Change 301848 had a related patch set uploaded (by Krinkle; owner: Alexia):
[mediawiki/core@master] LoginSignupSpecialPage: Restore key name 'extraInput' for compat with extension hooks

Krinkle changed the task status from Open to Stalled.May 22 2018, 9:51 PM
Krinkle added a subscriber: Krinkle.

@Alexia Can you specify how this broke extensions? E.g. through a hook? If so, please state which hook and include an example of that worked before and now doesn't.

Looking through the code modified by this patch, it seems the extrainput key is only used internally and not exposed through any hooks that I could find. I did find a few other unrelated methods in the same class that do still use the key extraInput and are exposed.

The introduction of this class can be traced to 3617c982c9db7 which is the introduction of AuthManager for the login page. Its commit message includes the following text which seems relevant:

  • Adding fields to the login/signup forms by manipulating the template via the extraInput/extrafields parameters is not supported anymore.

I suspect that maybe this patch was written in the hopes that it restores compatibility, but without knowing whether this worked for you, and how, I'm hesitant to merge it. In its current state, I suspect that maybe the patch may've been rebased from code that predates AuthManager. If that is the case, it would explain why the patch may've worked for you, but doesn't work on current master, where the code (albeit looking the same) is no longer called the same way.

Krinkle triaged this task as High priority.May 22 2018, 9:51 PM

The issue was that when I submitted this patch 1.5 years ago that it broke several extensions that relied on it and had not been updated yet.(Such as ConfirmEdit.) Looking at my current local code base all of those extensions have been updated and no longer rely on it. This can be abandoned.

Change 301848 abandoned by Alexia:
LoginSignupSpecialPage: Restore key name 'extraInput' for compat with extension hooks

Fixed by attrition.

Krinkle closed this task as Declined.May 23 2018, 6:23 PM

@Alexia Thanks for getting back, and sorry it took so long :/