[06:16:48] Well it looks like I just broke MediaWiki. All I wanted was a little warning box :'( [06:18:50] I imported the modules required for Template:Warning and saw the error about not having the content model 'sanitized-css'. I installed TemplateStyle extension, added it to my LocalSettings.php, tried to reimport the modules, and now the only thing on the page is Fatal exception of type "Wikimedia\Rdbms\DBQueryError" [06:20:29] No, I imported the templates before the modules. [15:15:57] I am writing unit tests for my extension, following the guide on MediaWiki.org. I am however running into a problem when I try to assert an exception happened. I have the following testcase: `https://hastebin.com/raw/fomurixejo`, which results in the following error: `https://hastebin.com/raw/unezaletic`. When I tell `$this->expectException()` to expect `\Exception::class`, it works fine. Does [15:15:59] anyone know why this happens? [15:20:17] Isn't ExpectException deprecated? [15:20:23] Or is that the new one.. I get confused [15:23:11] It might be? I really don't know [15:23:13] Let me look it up [15:23:15] Heh [15:25:01] https://phpunit.readthedocs.io/en/9.2/writing-tests-for-phpunit.html#testing-exceptions [15:25:10] I don't think it is [15:27:22] I guess the error is Exception is very generic and should be the base class of every exception [15:27:42] And ConfigException doesn't subclass ExpressionException but it does Exception [15:29:43] That makes sense, but ConfigException is never thrown in my extension [15:30:26] The `$parser->parse()` function can only throw ExpressionException, which does indeed extend `Exception`. [15:31:11] It seems like ConfigException gets thrown in GlobalVarConfig. Maybe wfMessage() fails? [15:35:29] Something presumably isn't being set up correctly [18:39:03] just started an old vm i had with mediawiki in it installed.. i cant login. resetted the password by direct db modification because all the other methods did not work but still i cant login. [18:39:17] im getting "Die automatische Erstellung des lokalen Benutzerkontos ist fehlgeschlagen: Dieser Benutzername ist schon vergeben. Bitte wähle einen anderen." [18:39:49] which is more or less "could not automatically create local user, it is already taken. please select another one" [18:40:07] i dont understand this error as im trying to login to this user not to create it [18:40:25] what can i do now? [18:55:02] hmm [18:55:12] Unless it was a really really old MW version... [18:55:23] I'd be surprised if a DB update of the password worked [18:55:28] maybe 1 year old [18:55:47] but its mentioned here as a solution: https://www.mediawiki.org/wiki/Manual:Resetting_passwords [18:56:03] so what can i do now then? [18:56:09] dont want to throw it away [18:56:36] For a one year old wiki, I'd be also surprised if changePassword.php didn't work [18:57:36] The error message is seemingly authmanager-authn-autocreate-failed because of userexists [18:59:56] Reedy: changePassword.php gives me this: http://ix.io/2orr [19:00:05] but the user exists [19:00:12] guess it fails because of the warnings above [19:00:30] I'm sure they're not helping [19:00:36] But is the case of the username the same? [19:00:59] what do you mean with the case of the username? [19:01:20] Foo is not the same as FOO [19:01:37] ye i pass it in correctly case sensitive [19:02:17] i can see that username in the db also [19:02:21] *too [19:02:39] its the only user btw [19:03:12] Does it show on Special:ListUsers? [19:04:24] i need to login to see that page [19:06:02] Reedy [19:06:29] Seems an oddly locked down wiki if for a single user in a VM [19:06:51] idk [19:06:56] just want to access it again [19:07:12] You could just remove the arbitary restrictions you've added to LocalSettings.php [19:07:16] That'll make it viewable [19:07:22] sec [19:07:52] do you know the setting sname? [19:08:50] You're probably looking for $wgGroupPermissions['*']['read'] = false; [19:09:37] Reedy changed it to true. now i can see that special page but it sais the page does not exist [19:10:37] https://de.wikipedia.org/wiki/Special:ListUsers works fine, redirecting to https://de.wikipedia.org/wiki/Spezial:Benutzer [19:10:44] English fallbacks are there in all languages.. [19:10:52] just found it :P [19:11:19] so it does list that one user i try to login to [19:13:37] that does confirm the username right? [19:13:44] but how do i reset the password? [19:13:50] i cant use email reset btw [19:15:52] Reedy: why does changePassword.php fail when the user exists? [19:16:02] I don't know [19:16:08] What version of MW are you running? [19:16:39] how can i check it? [19:16:51] autocreate normally happens when you are using some kind of central authentication extension [19:17:09] Sounds overkill for a single person wiki :) [19:17:12] i only installed some TeX stuff for math equasions [19:17:48] I'm not even sure I've ever heard of Mtag.php [19:18:08] oh god [19:18:09] https://www.mediawiki.org/wiki/LaTeX_with_Google_chart [19:18:37] that looks fun [19:18:46] that's one way of putting it :) [19:18:52] * Reedy looks for the template [19:19:18] iirc i did not use any google chart related things :/ [19:20:14] so i guess i'll just reinstall the whole thing [19:20:21] I would suggest at minimum commenting out the require line for Mtag.php out of LocalSettings.php [19:20:21] seems to be easier [19:20:32] You could just create a new user account [19:20:49] Like was said above, the behaviour you're describing doesn't sound anything like stock/vanilla mediawiki [19:21:13] how can i create a new user? [19:21:20] there is no option on the webinterface [19:21:27] I'm guessing you turned that off too [19:21:33] seems so [19:21:43] All seems kinda odd for a single user wiki [19:21:56] The createAndPromote.php maintenance script should do what you want [19:22:54] let me try that [19:24:14] the log file probably has more information [19:24:53] uhm im logged in [19:25:12] thing was i used the wrong username.. for some reason the one stored in the db and listed on that special page was wrong [19:25:12] especially if you set up something like https://www.mediawiki.org/wiki/Manual:MonologSpi.php#Minimal_example [19:25:58] thanks for the help tho [19:25:59] :) [19:26:08] lol [19:57:14] which php class/method can I give an unformatted text (string) and get the wikitext parsed variant back? [20:07:09] tgr_ Reedy so it seems i cant create content in my wiki.. whenever i create a site and click on "save changes" it shows me some sort of diff of the current state and the new one, clicking that button again removes all my editings. [20:07:10] wtf? [20:09:20] okay i can create sites bit not the mianpage [20:11:56] createAndPromote say user exists, changePassword sais user does not exist [20:11:58] uhm [20:12:03] what? [20:12:41] I've upgraded a wiki I've been maintaining for 12 years from 1.32 to 1.34. Both the upgrade to 1.33 and 1.34 was not painless at all. [20:13:02] I resolved all the issues except for redirect pages, which seem to be completely broken in 1.33 and 1.34 [20:13:14] IE: https://wiki.nycresistor.com/wiki/Bre [20:14:21] You can see in the logs that page, became a redirect stub in 2008: https://wiki.nycresistor.com/w/index.php?title=Special:Log&page=Bre [20:14:45] 1.32 was only released in 2019... [20:14:46] But now, the page is corrupt. It is impossible to delete, update, or touch in any way. [20:15:11] As are all the redirect pages. [20:15:12] tgr_ Reedy nvm, fixed it [20:15:38] https://wiki.nycresistor.com/w/index.php?title=Bre&action=edit [20:15:42] >The revision #0 of the page named "Bre" does not exist. [20:16:28] If I roll back the upgrade, that revision does exist. [20:17:04] @Reedy If you try to save, it will always say there is a conflict. [20:17:21] Did you run update.php and did it complete properly? [20:17:31] Yes. [20:18:52] The actor updates caused some problems. Which required cleaning up some unicode out of usernames. [20:19:05] But after several passes, update.php did complete cleanly. [20:20:43] Old redirects are the only thing that is broken at this point. [20:21:18] https://wiki.nycresistor.com/w/index.php?title=Bre&action=info [20:30:45] That does prove that the page exists. And I can see those rows in the database. [20:32:22] But I don't see this in the redirect table... Interesting. [20:33:03] it seems odd that all your redirects would just break [20:33:12] It only old ones [20:34:57] https://wiki.nycresistor.com/w/index.php?title=Ham_Radio/Repeater/WB2HWW&redirect=no [20:35:30] Newer than 2008, but still from 2011 and is fine. [20:57:42] Bleh, I'll do surgery in the database... But this sucks. [20:58:01] Query to get the old redirect values before this got moved to a redirect table. [20:58:06] select page_namespace, page_title, old_text from wiki_nycresistorpage as page, wiki_nycresistorrevision as revision, wiki_nycresistortext as text where page_id = rev_page and rev_text_id = old_id and old_text like "#REDIRECT %"; [20:59:33] You realise the redirect table has existed since 1.9 [20:59:49] Which is 2007... [21:02:37] Interesting... [21:03:03] The ones that are broken are not in that table, but 2007 would be the time this wiki got created [21:03:24] It's certainly things have been broken and fixed in that period [21:04:21] refreshLinks should be able to rebuild the redirects table I think