[09:21:45] Hi all [09:21:54] (oops, forgot to type my question before sending) [09:23:45] Is it possible to grant the right to modify other's user groups to a bot using bot password? In my case, I am trying to grant a bot in the group "In-game privilege worker" (see https://wiki-twi.1f616emo.xyz/wiki/Special:ListGroupRights), which has the right to add and remove "Server owner, Moderators and Helpers" groups, to a program using bot passwords. [09:24:59] However, I can't see any rights mentioning user group manipulation in https://wiki-twi.1f616emo.xyz/wiki/Special:ListGroupRights. [09:41:37] Sorry, it should be https://wiki-twi.1f616emo.xyz/wiki/Special:Version [09:41:45] oops, copy-paste error: https://wiki-twi.1f616emo.xyz/wiki/Special:ListGrants [09:49:28] nya_1F616EMO: refer to https://www.mediawiki.org/wiki/Manual:User_rights [09:51:11] specifically the part about adding new groups and the Management section's userrights description [09:58:04] though if you are trying to synchronise your wiki users with some third party account database you might want to look into other autentication scenarios like LDAP [10:02:18] nya_1F616EMO: also see https://www.mediawiki.org/wiki/API:User_group_membership which in its example directly tells you to see the bot passwords article [10:04:07] I did all of the required LocalSettings changes (more specifically, see https://pastebin.com/ce9btZty) and did use botpasswords on action=login. My confusion is that I can't see any botpassword rights associated with user group changing. [10:04:30] Anyways, I am testing my code, and if things goes wrong, I will post those error messages here / on pastebin [10:05:25] well, the API: article above shows an example of 'Remove Bob from the bureaucrat group, and add them to the sysop group, thereby granting them sysop rights.' and directly tells you to use bot passwords, so it should work [10:29:03] Thanks Remilia, It seems that the privilege is automatically granted to all bot password :-D [10:37:10] tbh I don't recall having to grant anything to my bot accounts before using pywikibot but it was a long time ago in a galaxy far away [11:40:02] Is it safe to assume every MediaWiki instances capitalize the first character of usernames? [11:51:55] nya_1F616EMO: I think it's configurable [12:07:16] RhinosF1: didn't you need hacks to allow lowercase at the start of a page title like on wiktionary? [12:07:37] MediaWiki itself does not allow it, see for example https://en.wikipedia.org/wiki/IPhone [12:07:43] Remilia: that's not a hack, that's a very legitimate configuration option [12:09:06] RhinosF1: can you link to the documentation for that? thanks in advance! [12:10:10] Remilia: https://www.mediawiki.org/wiki/Manual:$wgCapitalLinks [12:10:22] thanks \o/ [12:11:02] somehow I never managed to find it through searching before ahaha [12:12:46] That explicitly doesn't affect usernames though [12:12:56] So maybe usernames do always start with a capital letter [12:14:05] It's first letter case insensitive, but MW will output them first letter uppercase if it's outputting them [12:14:26] mediawiki.org/wiki/User:reedy and mediawiki.org/wiki/User:Reedy work the same etc [12:28:30] some namespaces are first-letter case insensitive even with $wgCapitalLinks [12:29:06] namespaces handled by mediawiki specially [12:29:10] for example Special: is fulle cases-insensitive [19:19:54] Hi, does anyone know if Title::newFromText behaviour has changed between MW 1.41 vs 1.42? [19:20:02] Under MW 1.41 doing: [19:20:24] https://www.irccloud.com/pastebin/ppjI1D3P/ [19:20:45] but under mw 1.42 that fails. [19:21:21] https://www.irccloud.com/pastebin/4DdcRG3g/ [19:22:19] I'm trying to fix SMW tests for MW 1.42 and I'm kinda stuck with this one. I'm not seeing anything obvious searching through the git history. [19:23:47] in SMW wgContLang is set to FR for this test. It poses in MW 1.41 and fails in 1.42. Simply because title isn't returning it as a category ns using Spanish word for category. [19:24:01] I'm aware that config was gotten rid of although in SMW they do https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/2cfda8933070800d649f4bc481f8be74de61443f/tests/phpunit/JSONScriptTestCaseRunner.php#L150 [19:28:17] There's this: Under a Spanish wiki I can do: [19:28:24] https://www.irccloud.com/pastebin/VZIZSo9B/ [19:28:42] but under an English one It returns: [19:29:06] https://www.irccloud.com/pastebin/yOjMiP07/ [19:29:19] even tho i supplied 'es' as the language [19:40:21] maybe some sort of localization cache issue [19:42:09] on current master, MediaWiki\MediaWikiServices::getInstance()->getLanguageFactory()->getLanguage( 'es' )->getNsText( NS_CATEGORY ) === 'Categoría' (even though my content lang is set to english) [19:42:13] for me [20:04:00] oh, how'd I fix localisation cache issues? Is there some function that needs to be called before calling getLanguage. Also the above pastes is from lives wiki and not from within the test (I did some debugging in the tests that led me to it being getNsText. Although strange that it works for you and I can reproduce on a live wiki running MW 1.42 and in SMW tests. [20:06:53] I don't know for sure it really is a localization cache issue, that's just the part responsible for this sort of thing. And if it breaks, usually that makes everything default to english [20:07:21] you could try running rebuildLocalisationCache.php --force to see if that helps [20:07:39] (Make sure to run it as the same unix user as your web server is running) [20:19:33] I wouldn't think that would fix it as it works under MW 1.41, not to mention it's the tests. I don't think it runs rebuildLocalisationCache.php. Unless update.php does. [22:27:46] paladox: you said "in SMW wgContLang is set to FR for this test" [22:27:56] is it really being run as FR instead of ES? [22:28:09] Oh sorry I meant ES. [22:28:16] ok [22:28:35] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/tests/phpunit/Integration/JSONScript/TestCases/f-0209.json#L38 [22:28:54] I first suspected that, but then I thought that perhaps the tests were somehow set with the wrong contlang... which would explain the failure :P [22:29:43] it's possible that what broke was that the switching done by the tests is not working [22:30:01] I found it's https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/src/Query/Parser/LegacyParser.php#L474 [22:30:14] It works under MW 1.41 but fails under MW 1.42 [22:31:11] verify if the objecte created with the wgContLang is of the right language [22:31:38] it is typically a long-lived object created once at the beginning [22:32:03] when the tests are changing the wgContLang, it might not actually be changing it [22:32:28] it would be otherwise it'd have failed under MW 1.41 surely? Although I'd note https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/src/Query/Parser/LegacyParser.php#L170 works. Returns the Spanish translated text of Category. [22:32:30] that is my suspicion [22:32:40] oh hmm [22:32:56] paladox: not if the way it is created changed between 1.41 and 1.42 [22:33:20] ah I see. [22:33:58] I know that wgConLang got deleted from core ages ago. I think around MW 1.36. Thought that could explain it but nope lol [22:37:05] Seems that wgConLang works? Although all I verified here was the global (won't be used in core, but the ContentLanguage service is overridden). [22:37:08] https://www.irccloud.com/pastebin/PW7NDgPI/