[02:14:33] hi, I’m seeking help with Extension:OAuth [02:15:17] I’m redoing an OAuth script to use OAuth 2.0, and currently I’m getting Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method) [02:15:46] Request URL is https://testwiki.wiki/rest.php/oauth2/authorize?client_id=a1173627d53b40993043f726fe9e3b91&scope=&redirect_uri=https%3A%2F%2Fphabricator.testwiki.wiki%2Fauth%2Flogin%2Fmediawiki%3Atestwiki%2F&state=39226c5325a6f3ded55506df1162ac0d94ec641c&response_type=code [02:16:12] MacFan4000: did you register a new consumer? [02:16:59] https://testwiki.wiki/wiki/Special:OAuthListConsumers/view/a1173627d53b40993043f726fe9e3b91 [02:17:09] And it’s approved [02:17:43] Source code of the script is https://github.com/Test-Wiki/phabricator-extensions/tree/master/src/oauth [02:20:03] that looks fine at a glance [02:21:29] that error message is kinda useless but it comes from a library so I suppose it is not easy to improve [02:22:21] I'd just bite the bullet and walk through the request in xdebug [04:11:40] Alright, been working on another custom extension here. This one creates a form to help users write articles with the proper format, as the particular site uses MediaWiki for news. I was getting these errors warning that "some parts of the edit form did not reach the server." It appears that the output created by the extension is intact, but I wanted to figure out why I was getting this error so I enabled a debug log file. That file [04:11:40] shows "[GlobalTitleFail] MessageCache::parse called with no title set" many times. Where should I begin looking to debug this? [04:12:39] Oh my god forget this entirely, I know what it is [04:14:29] The author wrote PHP code into a message, and I got rid of it but hadn't properly formatted and re-added it. [04:33:57] hello, I want to install semantic media wiki without Composer (I don't even know what that is), do I have to follow the instructions on this page then? https://www.semantic-mediawiki.org/wiki/Help:Individual_file_release [05:13:05] I ran the script and it produced a whole bunch of files and I don't know what to do with them: [05:13:07] https://usercontent.irccloud-cdn.com/file/OirXjrFL/image.png [05:24:16] So I figured out that the semantic media wiki script (from here https://www.semantic-mediawiki.org/wiki/Help:Individual_file_release) creates all the media wiki files along with the extensions that run the semantic media wiki. My problem is that I already have media wiki installed. How do I install just the semantic media wiki part onto my mediawiki? [07:34:05] Is this everything I have to install to install semantic media wiki? (+everything from the folder vendor), correct? https://usercontent.irccloud-cdn.com/file/pPfvp8tp/image.png [08:12:44] can anyone help? I'm getting this error during php update.php command: Uncaught UnexpectedValueException: callback 'SemanticMediaWiki::initExtension' is not callable in /home/cloudcell3/cloudcell.co.nz/includes/registration/ExtensionRegistry.php:539 [08:56:12] cloudcell: there was #semantic-mediawiki that may have a few people still around as afaik its no longer heavily published as a source of help. Alternatively sematic mediawiki does have a mailing list for help [08:56:55] p858snake: I hope it is not going out of fashion... [08:57:25] thank you p858snake [08:59:13] the irc channel logs do not look promising try the mailing lists https://www.semantic-mediawiki.org/wiki/Help:Getting_support#Free_support [09:07:28] thanks p858snake [14:46:31] how to add Portal namespace? What code should I add? [19:27:34] How do you resolve an extension module error? I'm seeing a frontend console error for "Error: Unknown module: ext.lazyload" [19:40:13] Remove it... Find it... [19:47:44] Well, I know exactly what's causing it (a module that's just loading JavaScript) but I'm not the extension author and have a harder time understanding how to repair it. I'm already cheating and using $wgHooks['BeforePageDisplay'] to do the same thing in LocalSettings.php. [19:53:12] Is there a way to get User ids in OAuth 2.0 with Extension:OAuth? (I know there is for OAuth 1.0a) [19:54:04] It isn’t provided in rest.php/oauth2/resource/profile [20:00:49] MacFan4000: the central ID is part of the response from that endpoint [20:02:36] Blackwire: see https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader#Registering [20:07:25] Hmm, well I have debug code to print the json to the error log, and I don’t see it in the json that was printed, I do see the rest of the expected info [20:07:50] https://github.com/wikimedia/mediawiki-extensions-OAuth/blob/804b7847cb5ccc55f765257d29a9080316874135/src/UserStatementProvider.php#L83 suggests it should be there [20:08:55] I admit I haven't tried, but yeah that's the relevant piece of code and I don't see how it could be skipped. [20:13:27] tgr_: The only thing I've noticed that looked incorrect from extension.json was using packageFiles vs scripts, and that doesn't seem to have solved anything: https://pastebin.com/WDZZC6xr [20:13:57] Well, I guess I’ll file a task then [20:26:57] Blackwire: Is it actually being loaded? [20:27:41] Reedy: Everything aside from the module itself seems to load for the extension, as it also does some items such as add data-* attributes to images. [20:28:43] And you have checked it out to Lazyload, not lazyload? [20:32:55] I thought that might be the problem, so I title-cased Lazyload everywhere in the extension itself later. No dice. [20:33:34] it was more the entry in extension.json in this case [20:34:07] Oh, to be clear, I'm also referring to the extension's class.php, main .php file, and the module JS name itself as well [20:35:52] (Oddly, when I look at the author's implementation at https://wiki.52poke.com/extensions/Lazyload/extension.json, which is the same as their repo, their site has no issue loading the extension. I'm on 1.33.1, this is on 1.35.0--so I wouldn't think there'd be any distinction) [20:36:30] not unless MW is doing something more strictly these days [20:43:32] The only issue I see would be fixed by https://github.com/mudkipme/mediawiki-lazyload/pull/11 [20:43:42] but that warning has been there since 1.29 [20:43:52] do you have debugging enabled on your 1.35, but not your 1.33? [20:45:41] I don't have debug enabled on the 1.33 install, no [20:45:44] For context, two example pages: [20:45:53] https://retrocdn.net/Entertainment_Software_Rating_Board (extension fails) [20:46:24] https://wiki.52poke.com/wiki/%E5%89%A7%E5%9C%BA%E7%89%88_%E5%AE%9D%E5%8F%AF%E6%A2%A6_%E7%AC%AC22%E4%BD%9C (extension works) [20:47:07] on the first link, the browser console is full of errors [20:47:19] ugh [20:47:25] two things... [20:47:29] one why is it doing a GEThttps://github.com/mudkipme/mediawiki-lazyload/tre/166e7f4b6543639dc18e89f41e05e0ea2d3ee5f6 [20:47:32] and why is it /tre/? [20:48:33] presumably it should be tree [20:49:49] that's gone away [20:56:32] I deleted all modifications and re-cloned the repo to try to keep things 1:1 [20:59:20] doesn't look to be erroring now [21:02:49] I'm still not seeing images load or the Unknown module on https://retrocdn.net/Entertainment_Software_Rating_Board [21:03:01] (Purged the page, etc.) [21:06:56] src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" [21:06:59] it's clearly there in the source [21:07:22] 39 times, in fact [21:07:34] images load fine [21:09:55] that's the typical 1x1 px transparent gif [21:10:59] mediawiki supports native HTML lazy loading for images out of the box though… [21:13:05] Indeed. Since 1.34 https://www.mediawiki.org/wiki/Manual:$wgNativeImageLazyLoading [21:15:16] I am using it (since we have image-heavy pages) and it works wonderfully, it even lowered the load averages by about 10% [21:15:41] much unlike every JS-based contraption I tried before [22:25:06] Yeah, I really need to just make the jump to 1.34 but I've been dragging my feet since 1.33 had article conversion issues to the new storage format [22:25:21] And I'm not looking forward to mass export/import to fix it :/