[00:48:54] hmm [00:49:13] my module still wont import to page [00:49:22] even though i registered it in resources.php [00:50:18] any more hurdles i have to overcome? [02:13:20] how does one get the extension to register? [02:14:41] using the php maintenance/convertExtensionToRegistration.php and my extension on the command line it displays me multiple errors, last of which that no such file or directory as (/var/www/w/MWMultiVersion.php): [02:15:21] only mwmultiverion.php is with another .erb extension and in "puppet" folder [04:10:02] i dont get it [04:10:10] my module still wont load [04:10:39] using $out->addModules('ext.FooModule'); in php [04:12:53] created extension for it , registered wgresourcemodules[ext.FooModule] in php and everything [04:13:11] Special:Version page shows that my extension is registered [04:14:34] $wgResourceModules['ext.FooModule'] = array( [04:14:34] 'position' => 'top', [04:14:34] 'scripts' => 'script/Detector.js') [04:26:17] after loading the module, im trying to execute function using$out->addHtml("" [04:26:56] but the console says init is not defined. True, it isn't, when the required scripts werent loaded [04:31:18] Harri1: you need to use $out->addHtml(ResourceLoader::makeInlineScript('init(...)')); [04:32:14] okay, thanks [04:32:23] but at first glance it seems like this isnt the problem [04:32:33] because the initial module doesnt load [04:33:16] in your JS console, what is the output of mw.loader.getState('ext.FooModule') ? [04:35:21] null [04:35:39] so yeah, doesnt exist [04:36:28] that means your module isn't being registered properly [04:36:54] what does your extension setup look like? [04:37:03] thats what i figured yeah and have been trying to pinpoint [04:38:50] extension setup? [04:39:48] i have the main FooModule.php file with the usual wfloadExtension code [04:39:56] the json file with info [04:40:17] and script files [04:41:14] also, php file contains the wgResourcemodules[ext.fooModule implementation [04:41:30] thats where the module should be registered fro what i understand [04:44:57] does the json file have to contain the "ResourceModules" (and"ResourceFileModulePaths") info also? [04:46:13] because when i tried to insert this, the mediawiki installation went broke, so I took it out atm [04:47:36] lopooking at, for example, TitleBlacklist extension, it doesnt contain the module info in php file at all, only in json [04:50:34] it should just be in JSON [04:50:39] the PHP file isn't used [05:04:37] okay [05:04:41] progress, i guess [05:04:50] mw.loader.getstate now says registered [05:06:08] but init is still not defined [05:06:57] out->addModules('ext.FooModule'); is still the code i am trying to import it with [05:09:04] okay, looking at the code on site, theres certainly mw.loader.load(["ext.FooModule",...] [05:10:04] but firstly, its at the bottom of the page when it loads it [05:10:38] (so that is certain ly an issue, if init(...) is being called before the module is loaded [05:11:28] and secondly, the page source still doesnt show those scripts anywhere what should be loaded with the module [06:03:16] ragesoss: yes, but not necessarily a big one [06:03:23] https://meta.wikimedia.org/wiki/Special:OAuthManageConsumers/approved/0fde3e1e451907e9653ea612f7b30a5a does that [06:04:30] the threat model is that the attacker pretends to be your app, obtains authorization and then does evil things with your account [06:05:25] if the application is too limited to do evil things with, it's not a problem in practice [06:05:46] csteipp is a better person to ask where the limits are, though [06:08:33] abartov: authorization is when a user allows the OAuth app to act in their name, approval is when an admin reviews an OAuth app and decides it is OK to use [06:10:27] before an app is approved, it cannot be authorized, except by the owner (so that it can be tested) [06:10:42] owner-only apps are auto-approved and auto-authorized [07:44:27] tgr: thanks! I think something just like that example — an auth-only consumer that would be included in a vagrant config — is just what I want to do. [07:55:44] [[Tech]]; ArchiverBot; Bot: Archiving 1 thread (older than 30 days) to [[Tech/Archives/2016]].; https://meta.wikimedia.org/w/index.php?diff=15480350&oldid=15479871&rcid=7580229 [09:01:06] tgr: thanks! [14:24:18] interesting, why wont my module scripts load on the page when i AddModules on page [14:58:49] I found a small bug in echo but I'm on a mobile and can't attach screenshots to Phabricator. Anyone from discovery team here? quiddity? [15:00:48] Josve05a What's up? [15:02:22] Notice the exposed html code in the top notification https://usercontent.irccloud-cdn.com/file/bASG6t26/IMG_2747.PNG [15:02:27] CKoerner_WMF: ^ [15:03:25] What the edit summary actually looks like: https://usercontent.irccloud-cdn.com/file/XQ9UO6ZQ/IMG_2748.PNG [15:03:55] A small thing, but still... [15:04:13] Yeah, it looks like Echo isn't parsing the template there correctly. [15:04:30] I'll follow up with quiddity once he's awake. :) [15:07:22] Merci! ☺️ [23:07:08] how to get scripts loaded with ResourceModule? [23:07:28] the scripts are defined in my extension.json file, but they wont load after i call AddModule