[15:18:48] There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Please resubmit the form. [15:19:00] our wiki farm is having this error when logging in any idea how to fix it? [15:44:54] Cocopuff2018: see https://www.mediawiki.org/wiki/Manual:How_to_debug/Login_problems [16:36:03] Helo guys! I need some help! [16:51:21] Gawrion: how can we help? [16:56:43] Hey Brian! I remember u from Mediawiki desk :) it seems that u re only one active. :) [16:59:25] I try to implement custom fields at registration page (https://www.mediawiki.org/wiki/Manual:SessionManager_and_AuthManager/Adding_fields_to_the_registration_form) [17:04:06] But i fail. There is lack of info where to (to which file)  put this classes and how to make use of them especially with extension. [17:05:50] Gawrion: are you working on a MediaWiki extension, or is this for a particular wiki you maintain? [17:06:30] i managed to instal 1.40.1 mediawiki with few extensions [17:06:47] and now i try to customize registration page [17:08:18] i tried to build custom extension for that but i failed - i managed to see on extension list, i managed to autoload this classes from example but something is wrong with my extension.json becouse no new fields appeared on registration page [17:12:44] it would be nice if someone could explain how to completely add these custom fields, including file names, file structure and complete extension.json. It would be ideall if someone would edit this manual on mediawiki [17:13:28] i program a little bit in php, in js, but my knowlege about mediawiki is to small to understand what to do [17:13:50] The AuthManager docs are a bit dense, I agree [17:15:14] Gawrion: Did you add it to $wgAuthManagerAutoConfig (or $wgAuthManagerConfig ), i suspect based on your description that that might be the part that's missing [17:16:48] no - i dont remeber that part ;) [17:17:12] it seems that information is missing from this manual i supose :/ [17:24:24] ok - i did it by json and... it works. I got two new fields. Yuppi :D Now i must to change them to checkbox. BTW - if i add these new fields they will be saved in database and then i can make use of them? It seems yes ;) [17:24:59] Bawolff - U are my hero for today becouse i was so sad with my fail ;) [17:25:31] glad to help [17:25:45] We should definitely mention that in the manual [17:25:48] all our docs sort of suck [17:26:59] They won't be automatically saved to database, you have to write code to do that [17:27:44] if you don't want to add a bunch of extra database code, you can save them as a custom user preference [17:29:00] https://www.mediawiki.org/wiki/Manual:User_preferences is our docs, but it fails to mention how to save a preference :S [17:34:05] yea - documentation sucks so much... :/ [17:34:56] in these example code there is mentioned database save :/ [17:37:11] finally i dont need database save - i only need validation if checkbox is ticked when submiting [17:37:56] saving to database is how preferences are stored. if you don't do that, nothing will change once they browse away to other parts of the site [17:38:00] so yeah, you do need a db save [17:39:43] best bet is honestly to find a not-super-complex that does something similar to what you want and then see how it does it (I say not super complex because otherwise it'll take hours/days just to understand the extension's internal logic so you know where to look) [17:40:52] moon - but i only need to have checkbox ticked that user accepts Terms Of Use [17:41:27] so i only need validation [17:42:19] one more question - now my checkbox field is last - how i can change order? [17:42:32] do you care about saving/recording that the user checked it? [17:42:49] if no, then yeah you don't need db. If yes then you do [17:43:15] it would be nice to save but if thats required all registered users will have only one option, so... i dont need to save ;) [17:43:16] (and the question then becomes why do you want to record it, i.e. as an audit trail/log, or what?) [17:43:44] if you're using OOUI there should be a way to mark a field as "required", which will add the validation you want [17:43:53] its terms of use acceptation [17:44:16] what is OOUI :D ? [17:46:10] OOUI is the name of one of MediaWiki's UI frameworks [17:47:40] MediaWiki also has a Special:Log feature where you can make custom logs of things [17:48:14] Hmm, there is an Extension:LegalLogin that's kind of similar but does it on a separate page [17:49:20] https://www.mediawiki.org/wiki/Category:AuthChangeFormFields_extensions may also be a helpful starting point for relavent extensions [17:49:59] How to change order of that new field? now its last... btw - i managed to make a css class of it (that part works) [18:40:02] it's so sad that in mediawiki u cant delete user - i had to make copy for tests :/ [18:40:42] it seems validation part of code doesnt work :/ [18:45:14] there's a maintenance script to delete accounts with zero edits [18:45:42] it's potentially risky if you have extensions enabled that store things tied into a user [19:03:42] ok - i must to rewrite this code to use: https://doc.wikimedia.org/mediawiki-core/master/php/interfaceMediaWiki_1_1Auth_1_1PreAuthenticationProvider.html#details instead of secondaryauthprovider [19:22:03] this manual code is broken: MyExtraFieldsSecondaryAuthenticationProvider::beginSecondaryAccountCreation() returned FAIL. Secondary providers are not allowed to fail account creation, that should have been done via testForAccountCreation(). [19:22:46] becouse it has conditional to fail, but secondary provider cant fail.. :/ [21:31:12] i was writing and was logged out.... [21:32:41] i just want to let u know i written extension that is adding checkbox at registration page with simple validation - u think i should share it with community after some testing and fine tuning (maybe adding some customizable parameters)?