[12:54:03] Been having trouble getting a hook recognized and I'm not sure what I'm doing wrong. Can someone take a look at the extension.json and the code, here? I followed the manual but I still get an "interface not found" error. extension.json: https://pastebin.com/QnLE2hGb and the hook: https://pastebin.com/LQMTr0Zx [12:56:45] jfolv: You are missing a use statement [12:56:54] you need use BeforePageDisplayHook; [12:57:18] (or alternatively, you need class PWVid implements \BeforePageDisplayHook [12:57:50] (since an alternative to use statements is to prefix things with a \ to mark them as from the global namespace) [12:58:28] Well that solved that problem, but now it's telling me that the class isn't found [13:00:28] I could've sworn this was the right way to do this, and that the autoload in the json file should've taken care of getting the class loaded [13:01:09] you have autoload set up for 'PWVid', but the class name is 'MediaWiki\Extension\AdHook\PWVid' (two separate things) [13:01:23] Ah, need the full namespace [13:01:27] Thanks! [13:01:42] yeah. also you can set AutoloadNamespaces to automatically map a namespace to a directory [13:05:44] Ah, that's how I did it last time. I haven't worked with this system in awhile. [13:13:11] Interesting. I had some JSON problems that I fixed, and now the interface missing error is back. I put a use BeforePageDisplayHook; statement, but it still says interface not found. [13:21:51] I don't understand what I'm doing wrong, here. The correct name is BeforePageDisplayHook, right? So why won't it load the interface when I have it using the proper namespace? [13:22:23] Can you pastebin the most recent version of what you have? [13:23:49] https://pastebin.com/VihwpVsp [13:23:56] I assume you are targeting a version of mediawiki that is 1.35 or newer? [13:24:05] Yes [13:24:25] This one in particular is a little older, 1.35.0 [13:24:50] In theory, that is the first version to have that interface [13:25:06] so it should work but is right on the edge of when it was added [13:25:45] So the code looks correct, then? [13:26:02] yes, it looks correct to me [13:26:52] Well, guess I'll have to just upgrade real quick. This is a test install anyway. [13:28:08] Appreciate the help! [13:31:31] BeforePageDisplayHook is actually MediaWiki\Hook\BeforePageDisplayHook, so the use statement is wrong [13:31:44] oh right. [13:31:55] I'm sorry, that was my bad, i forgot about that [13:32:33] * bawolff still hasn't gotten used to the new hook system [13:34:50] Oh thank god [13:37:48] Yep, that fixed the interface error. Except now I get an error that the class "contains 1 abstract method and must therefore be declared abstract or implement the remaining methods" [13:37:58] Isn't onBeforePageDisplayHook the only method? [13:38:48] (I'm mostly following the examples listed at https://www.mediawiki.org/wiki/Manual:Hooks ) [13:42:05] * taavi updates the docs [13:42:55] onBeforePageDisplayHook is the only method, but it needs to be declared exactly like in the interface but the docs were missing the return type [13:58:41] Even with adding the : void before the curly brace, I still get the same error. [14:00:55] oh, you named the function onBeforeDisplayHook, it should be just onBeforeDisplay [14:01:15] The interface name has Hook at the end but the method does not [14:01:49] That did it! [14:02:00] I'll update that in the docs lol [14:03:55] thanks [14:03:59] our docs are so shit [14:04:25] They work just enough to be helpful and frustrating at the same time :P [14:04:39] I miss the days of $wgHooks... [14:08:52] people still haven't totally switched over to hookhandlers, the version for static methods is essentially the same as $wgHooks but with json syntax [16:21:28] (Not using MediaWiki Docker) Using Docker Compose with my laptop as the host, VE won't work for me when I map any port besides **80** for MediaWiki. So, when I click 'Edit' I get... (full message at ) [16:24:28] I'm on a Mac running Docker Desktop, and the MediaWiki container is based on the official image so running Debian 11.5 [16:27:12] I think it would make the connection from inside the container, so it matters what port apache is listening on, not what is mapped by docker [16:27:21] i think anyways, i don't know much about docker [18:52:29] This worked!! (even though my setup is not MediaWiki-Docker) Found at the [instructions for MediaWiki-Docker](https://www.mediawiki.org/wiki/MediaWiki-Docker/Extension/VisualEditor#Modify_LocalSettings.php)... (full message at ) [19:13:41] Hi - I'm trying to find anyone who helps engineer the search implementation for wikipedia.  I'm doing a presentation with a fully downloadable git repo that downloads the wikipedia articles, downloads and configures solr, and indexes all of the english wiki content.  I'm going to tie some metadata that's available to try and create some training [19:13:42] data to demonstrate some advanced features of the search engine.  I wanted to see if there's anyone whom might work on search for wikimedia who can tell me about any pain points they have today that this could help with. [19:14:04] tl'dr - is there anyone who knows how I can talk to someone at mediawiki that works on search? [19:25:38] Kristian: https://www.mediawiki.org/wiki/Wikimedia_Search_Platform [19:26:13] THANK YOU! rundg[m]