[00:02:37] smartyrad: the documentation for using hooks is https://www.mediawiki.org/wiki/Manual:Hooks [00:02:59] for the specific hook, it's https://www.mediawiki.org/wiki/Manual:Hooks/BeforeInitialize [00:05:25] but if you rethink a little how your extension works, you can probably avoid the need to use the session on setup altogether [00:25:24] tgr: I tried to change the logic a bit. I modified the constructor method instead of the callback function [00:26:24] I copied the code inside the calllback method into the constructor method. Still doesn't work [00:28:23] tgr: I also tried adding a Boolean flag variable. But even that doesn't work ( I don't think that was wise either since ultimately we will have to use something similar to sessions for multiple users to be able to browse the website simultaneously) [00:28:42] but I just thought I'd try it anyway [00:28:59] you shouldn't really need that code at all, it's not doing anything that's necessary for the SimplerCaptcha workflow [00:33:24] tgr: You mean this https://gerrit.wikimedia.org/r/#/c/383299/7/SimplerCaptcha/SimplerCaptcha.class.php@50 method? [00:35:58] smartyrad: yeah, SimplerCaptcha doesn't need a captcha store in the first place [00:36:59] normally it's select a challange -> store which one we selected in the session -> send it to the user -> compare the solution with what we stored in the session [00:37:57] but an AI-based captcha would not have separate challenges, the "challenge" is just "behave like a human while filling out the form" so all that's not needed [00:39:01] hm, I guess you do need it after all when you are falling back to the other captcha [00:39:24] tgr: True, but for this task I guess we need it right? :) [00:41:24] in that case, just try to call it from the BeforeInitialize hook, session handling should be set up by then [00:48:31] tgr: Okay, so I'll remove the callback from the extension.json and use the hook to call the method instead and get back to you [00:59:55] tgr: For some reason, even that doesn't seem to work . No errors are thrown this time but the captcha isn't changing either :( [01:09:36] smartyrad: if you have some free time, I'd recommend getting familiar with how to use a debugger, that makes it a lot easier to figure out what's going on [01:10:46] we have some instructions in https://www.mediawiki.org/wiki/MediaWiki-Vagrant/Advanced_usage#MediaWiki_debugging_using_Xdebug_and_an_IDE_in_your_host but half of that is wrong :( [01:11:42] what development environment are you using? [01:18:11] tgr: I do see instructions for phpstorm in the link that you have provided but since you mentioned that it's wrong, how shall I go about it? [01:38:12] smartyrad1: I wrote some quick docs: https://www.mediawiki.org/wiki/User:Tgr_(WMF)/Debugging_with_XDebug_and_PHPStorm [01:38:19] let me know if they work for you [01:44:28] tgr: Sure, thanks :) [22:33:29] Hi all! I was trying to fetch the viewcount of a page from 'page' table, it had a field called page_counter, but got deprecated in version 1.25 and the field is no longer available. Is there some substitute to this field ?