LoginSignupSpecialPage.php form won’t let me add fields

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

LoginSignupSpecialPage.php form won’t let me add fields

John Shepherd
Hello all,

On my own mediawiki install, I am trying to add another checkbox field to the Special:CreateAccount page. I have found the code responsible for the form, but for some reason the checkbox does not show up. As a test, I then went and tried copying and pasting one of the existing text boxes (with its IDs etc changed of course) to see if that would work. Nothing shows up other than the fields already present.

Does anyone have any ideas what could be blocking it and/or what I am missing? Below is the diff of the change that doesn’t show.

https://github.com/TheSandDoctor/misc-code-bits/commit/4f2f6221c64095777622219c6c04c174eb197597

Thanks!
TheSandDoctor

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: LoginSignupSpecialPage.php form won’t let me add fields

John Shepherd
Forgot to add that this is a brand new install without any extensions.

On 2019-09-21 at 10:00 AM, John Shepherd wrote:

> Hello all,
>
> On my own mediawiki install, I am trying to add another checkbox field to the Special:CreateAccount page. I have found the code responsible for the form, but for some reason the checkbox does not show up. As a test, I then went and tried copying and pasting one of the existing text boxes (with its IDs etc changed of course) to see if that would work. Nothing shows up other than the fields already present.
>
> Does anyone have any ideas what could be blocking it and/or what I am missing? Below is the diff of the change that doesn’t show.
>
> https://github.com/TheSandDoctor/misc-code-bits/commit/4f2f6221c64095777622219c6c04c174eb197597
>
> Thanks!
> TheSandDoctor
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l


_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: LoginSignupSpecialPage.php form won’t let me add fields

Florian Schmidt
In reply to this post by John Shepherd
Hi,

to your problem: Probably take a look here: https://github.com/TheSandDoctor/misc-code-bits/blob/master/LoginSignupSpecialPage.php#L707

That might be related to your problem.

However, not sure what you actually want to achieve, and if you're just doing it out of fun or if you want to use it in production. If the latter one: Don't do it. Changing the code of mediawiki/core or any extension is basically the worst thing you can do. You will lock out yourself from being able to easily upgrade your wiki and you never know if you probably break crucial features or security barriers with changing the code. Instead, you should try to do whatever you want to do by using one of the several hooks, MediaWiki provides, to customize the software, This makes sure, that you're using well-defined and supported interfaces to actually change the behavior of your wiki. In your case, the AuthChangeFormFields hook, might be out of interes.

Kind regards,
Florian

-----Ursprüngliche Nachricht-----
Von: Wikitech-l <[hidden email]> Im Auftrag von John Shepherd
Gesendet: Samstag, 21. September 2019 19:01
An: [hidden email]
Betreff: [Wikitech-l] LoginSignupSpecialPage.php form won’t let me add fields

Hello all,

On my own mediawiki install, I am trying to add another checkbox field to the Special:CreateAccount page. I have found the code responsible for the form, but for some reason the checkbox does not show up. As a test, I then went and tried copying and pasting one of the existing text boxes (with its IDs etc changed of course) to see if that would work. Nothing shows up other than the fields already present.

Does anyone have any ideas what could be blocking it and/or what I am missing? Below is the diff of the change that doesn’t show.

https://github.com/TheSandDoctor/misc-code-bits/commit/4f2f6221c64095777622219c6c04c174eb197597

Thanks!
TheSandDoctor

_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: LoginSignupSpecialPage.php form won’t let me add fields

Brian Wolff
In reply to this post by John Shepherd
If you havent seen it, the docs at
https://www.mediawiki.org/wiki/Manual:SessionManager_and_AuthManager/Adding_fields_to_the_registration_form
may be helpful.

--
Brian

On Saturday, September 21, 2019, John Shepherd <[hidden email]> wrote:

> Hello all,
>
> On my own mediawiki install, I am trying to add another checkbox field to
> the Special:CreateAccount page. I have found the code responsible for the
> form, but for some reason the checkbox does not show up. As a test, I then
> went and tried copying and pasting one of the existing text boxes (with its
> IDs etc changed of course) to see if that would work. Nothing shows up
> other than the fields already present.
>
> Does anyone have any ideas what could be blocking it and/or what I am
> missing? Below is the diff of the change that doesn’t show.
>
> https://github.com/TheSandDoctor/misc-code-bits/commit/
> 4f2f6221c64095777622219c6c04c174eb197597
>
> Thanks!
> TheSandDoctor
>
> _______________________________________________
> Wikitech-l mailing list
> [hidden email]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l