[01:52:41] can i set mediawiki to allow normal users to delete pages? [01:55:34] k-man: sure, just give whichever group you want the 'delete' userright [01:55:50] ah ok. is that done in the config or in the frontend? [01:55:55] https://www.mediawiki.org/wiki/Manual:User_rights [01:55:58] in LocalSettings.php [01:56:01] thanks [02:09:17] legoktm: great, works as described :) [02:09:50] :D [02:09:56] "Why does my wiki not have any pages anymore?" [02:11:23] its a small private wiki, should be fine [02:11:30] i have backups too [15:50:50] Hello. [15:50:50] We have an occasional problem where users get the message: "Error contacting the Parsoid/RESTBase server: http-bad-status". When saving pages in Visual editor. [15:50:51] The wiki version is 1.35, running on Ubuntu 20.04. [15:50:51] How can I enable trace, or figure out what could be the source problem ? [15:51:52] Hello and big thanks for the free software and support! I finally found instructions for how to export-import citation templates https://www.mediawiki.org/wiki/VisualEditor/Citation_tool so I gave it a shot at my private test wiki. After installing the dependencies and importing the exported templates and modules, I'm getting error 'Script error: The function "citation" does not exist.'. Tried searching on a search engine, no luck. For [15:51:54] disclosure: My Composer complains that it is out of date and should be updated to 2.0 [15:54:30] All the refs in currently contain the contents of the Main Page, except the first one gives that abovementioned error 'Script error: The function "citation" does not exist.'. I'm confused [16:01:14] My composer is installed with apt and is version 1.8.4-1 [16:01:17] ... if that helps [16:03:29] onejukeboksi: MediaWiki only supports composer 1.x [16:04:20] composer 1.x is still supported by upstream too [16:05:34] ok, thanks for that info. Any idea about the function "citation" not existing. I can post a list of what got exported when I exported the most common citation templates, if that helps [16:08:10] Here are the templates and modules that I imported https://paste.debian.net/1173215/ [16:12:10] Do you have scribunto installed too? [16:12:50] Yes. The extensions I needed to install were TemplateData and TemplateStyles [16:14:57] But perhaps I have not initialized it like it says here: https://www.mediawiki.org/wiki/Extension:Scribunto [16:25:15] now I checked the Scribunto install list and I have performed all steps. Now I am getting error "MediaWiki\Storage\NameTableAccessException from line 43 of /var/www/kunsolan.fi/testing/wiki/w/includes/Storage/NameTableAccessException.php: Failed to access name from content_models using id = 2" when trying to access the page I'm using for testing if the citation templates work [16:30:24] I see someone stating in https://gist.github.com/freephile/a7bda4f6ae193d6de2327fafcf8fcb41 that running 'php maintenance/populateContentTables.php' fixed it for him [16:32:19] running that just commented that everything has already been populated [16:35:37] something somewhere slightly wrong, but I don't know what: "Failed to access name from content_models using id = 2". Something needs to be populated or has been neglected to be populated I would guess [16:40:11] This is not very useful for my problem https://www.mediawiki.org/wiki/Manual:Content_models_table [16:41:13] I would think that the content model for an article would automatically be set. The test wiki had only 1 article (Main Page) previously, so I'm guessing that "id = 2", bit is the testing article I created that now throws an exception [16:51:19] Is this summary RDable [16:51:20] https://www.mediawiki.org/w/index.php?title=Extension:Title_Blacklist&curid=257082&diff=4241325&oldid=286186 [16:51:33] seems some email with address, seems disturbing [16:56:32] Yes, I'm going to delete it [17:12:08] My error could have something to do with https://www.mediawiki.org/wiki/Manual:$wgContentHandlerUseDB ... says this one was removed in 1.35.0. [17:15:14] You're seemingly getting the same as T241977 or T224949 [17:15:15] T224949: Failed to access name from slot_roles using id = 1 - https://phabricator.wikimedia.org/T224949 [17:15:15] T241977: NameTableAccessException.php: Failed to access name from content_models using id = 2 - https://phabricator.wikimedia.org/T241977 [17:17:20] ok. mysql time it is ... I'm going to see what is in that table, if anything [17:19:42] table 'content_models' contains one row, with values model_id = 1 and model_name=wikitext [17:23:25] so I'm thinking that it got confused because of the .css that I imported ... what should I do? I have the possibility to start over or try to fix this with the fix of inserting the values suggested in https://phabricator.wikimedia.org/T241977 by Seb35 [17:25:58] After "INSERT INTO content_models VALUES (2, 'css');" trying to load the page complains "Failed to access name from content_models using id = 3" [17:28:04] So... aparently the extension is trying to insert a scribunto or lua content model, if fails somehow to insert it into the content_models table but tries to get it anyway as the new index [17:28:40] something very much like that seems likely.. [17:29:30] Apparently, 'css' is not the content model it's trying to use [17:30:41] on that table, I have one called "Scribunto" (yes, with capital S) [17:30:43] When importing the stuff I needed to install a thing for 'css-sanitized' (iirc) [17:30:52] try to update the id = 2 with that [17:31:16] so update id=1 to be "Scribunto", hold on a sec [17:31:48] no! update the id=2 [17:32:45] yeah, sorry, my bad, dyslexia of sorts.. [17:34:54] Updated record #2 (or actually deleted the record and added it again, this time with value "Scribunto", but still seeing "Failed to access name from content_models using id = 3". Did an 'sudo apachectl graceful', no effect [17:37:41] Here are all changes I did to LocalSettings.php https://paste.debian.net/1173270/. [17:39:14] I added '$wgScribuntoDefaultEngine = 'luastandalone';' only after importing the xml-dump, perhaps I should revert database to untouched-state and try the importing again [17:43:57] From https://www.mediawiki.org/wiki/Extension:TemplateStyles "First, the CSS page must be created. By default any subpage in the Template namespace with a title ending in ".css" will be created with the "Sanitized CSS" content model if it contains no syntax errors. Otherwise, plain CSS is used as fallback, which does not work with Template Styles." [17:45:46] I dunno what is wrong and my eyes hurt [17:52:45] I popped in an unchanged database and upon import of the templates and modules I get error 'Import failed: Main slot of revision not found in database. See T212428.' so I'm looking at https://phabricator.wikimedia.org/T212428 and it does not seem fixed yet [17:52:46] T212428: includes/Revision/RevisionStore.php: Main slot of revision (number) not found in database! - https://phabricator.wikimedia.org/T212428 [17:53:16] someone says to keep on running it till success, but I don't think he is running a Special:Import [17:54:31] Are you running on a primary-secondary database setup? (aka master-slave) [17:54:43] no, just a single MariaDB [17:55:10] then that bug should not be relevant here [17:55:30] this is the contents of my content_models table: https://dpaste.org/RiUz [17:56:09] thanks [17:57:22] I don't think I have any .js files, but should I try those values? Seems like an awful hack: add some rows to the database and hope they are right [17:57:45] The "Main slot of revision not found in database" error, however, doesn't seem to be caused by the contents of that table... well, unless you deleted the wikitext content model [17:58:35] nope, there is one entry with id=1 and value "wikitext" [18:00:47] maybe you need to run update.php after you restored your database from old state [18:03:54] maybe.. I edited the table to have same values as yours Vulpix and now the import finishes. Looking at the import report, the one where it failed before manually editing the database was 'Template:Cl' [18:05:21] it appears the imported citation templates are now rendering correctly [18:07:04] I'll make notes now. This is one dirty hack: "Insert the same values into the database as someone else has" [18:08:39] Maybe running update.php was the step you were missing before too [18:13:36] yeah... I'ma do this one time over, so that my notes are precise [18:17:27] import finished, no errors, still only one entry in content_models [18:30:01] I noticed that I was missing Template:Citation, so I included that in the export-import, and now all references complain "Script error: The function "citation" does not exist.". Nothing else I did differently, and the previous time around all the citation templates, except Template:Citation were working [18:32:57] Here is a record of what was imported https://paste.debian.net/1173278/ [18:34:04] Template:Citation may require a module that's not available in your import [18:34:40] I selected "include templates", which did pull some modules too [18:34:44] Also, imports probably don't import templates in the right order (a page may get imported before the required templates) [18:35:20] I'ma check the documentation for Template:Citation [18:35:21] Be sure you run the runJobs.php maintenance script after large imports [18:35:31] good idea [18:36:44] lots of unrun jobs were there.. lets see if it works now [18:37:36] no effect, still 'Script error: The function "citation" does not exist.' in every instance of citation templates [18:39:04] After graceful restart of apache, I'm getting "Failed to access name from content_models using id = 4" so I guess it is back to the dirty hack. Lemme first see what are the 2 entries it probably added [18:40:38] there is only one entry in content_models, id=1 and content is "wikitext". Perhaps there is something wrong with whatever is responsible for updating that table [18:41:21] Are you importing after you upgraded? [18:41:27] I wonder what happens if you import the pages before... [18:41:37] Or create a page with those content models after you've upgraded [18:42:18] Reedy: yes, I imported after the 'php maintenance/update.php'. Should I try the other way around? [18:42:56] Well, I wouldn't suggest importing on 1.35 before running update.php [18:43:02] but you could import it on your old install, first [18:43:29] It sounds likely there's an edge case about importing pages different content models doesn't cause the content_model row to be inserted [18:43:30] This wiki is not being upgraded, I already upgraded this to 1.35 pretty much when it came out [18:44:20] if it was already on 1.35, update.php should be a no-op [18:44:29] most maintenance scripts aren't run again via update.php (unless done manually) [18:45:46] I revert to the "empty" database and try importing first and only then 'php update.php' and 'php runJobs.php' ? [18:45:56] No [18:46:35] update.php is only needed when you've upgraded MW and haven't run the database updates yet [18:48:46] so... the dirty hack of entering manually to what Vulpix had in content_models his database, and see what happens (and hope that this does not lead to a broken system) [18:50:03] Here is the backtrace available with debugging on: https://paste.debian.net/1173281/ [18:50:18] > update.php is only needed when (...) --> Also when you install an extension that requires it [18:50:37] That's an upgrade to MW, technically. [18:50:42] But yeah. [18:50:47] And also "when needed" [18:50:48] ;P [18:51:03] I'm not sure if Scribunto and TemplateStyles were installed after or before taking the db backup [18:51:18] That's a good point [18:51:27] If they weren't, and the import was done first... It might explain things not working quite right [18:52:23] I'ma do the sql hack and see what happens [18:52:54] This would be the case if scribunto or TemplateStyles relies on update.php to populate the content_models table instead of "lazy-populating" it [18:53:36] Still, requesting a greater model_id than the greatest one present on the database is odd [18:54:08] plausible on a master-slave scenario where it reads stale data, but that's not the case here [18:55:03] Vulpix: I can confirm that it is trying to access an id that doesn't exist, because now the Internal error dump complains about 'id = 6' not being there. I just inserted values for 2,3,4 and 5 [18:55:42] It should be easy enough to replicate this with a new empty wiki though if someon has some time [18:57:22] someone else probably has a more automated way of spinning up another Mediawiki. Mine is rather manual, but then again I'm the one with the bug.. [18:57:43] yeah, I wasn't necessarily suggesting you doing it [18:57:52] though, you're able to revert to your backup easily enough [18:58:07] or maybe the contents of the content_models get cached on a service/memory/class, the new model gets inserted, but the internal cache doesn't get populated. When it tries to access the new created model from the cache, it's not found, crashes, and roll-backs the entire transaction [18:58:50] that would make more sense [18:59:28] If there is any information that I could help you fine people with, just ask [19:01:26] A bug report with good steps to reproduce and version information may be useful. I can add those notes on it when I come back [19:01:35] There's definitely some bug/edge case here... What it actually is, is unclear [19:01:42] It's potentially worth throwing into a task... And getting a copy of the file you're importing for ease [19:02:11] I can have a try of replicating it in mediawiki vagrant later, but it's probably computer break time now for me, including food and maybe some exercise if it's not too cold out [19:02:19] onejukeboksi: Do you have a phabricator account? [19:02:45] I would recall that yes. Lets see what my login is [19:03:34] Reedy: I logged in with OAuth from mediawiki.org [19:03:42] .. into Phabricator [19:03:51] what should I do? Prlly write a ticket.. [19:04:26] Yeah ;P [19:04:41] Title of something like "missing content_model" rows after importing templates and modules [19:04:53] Ok [19:05:07] Mention it has been discussed on IRC etc [19:05:32] Give the information you've given on here (you can mostly copy paste the IRC logs as appropriate) [19:10:52] I'm editing my notes for copy-paste to bug report [19:11:45] thanks [19:12:08] probably helpful if I try and reproduce it later rather than trying to read a load of IRC lines [19:14:41] Definitely food time for me [19:45:56] Bon appétit Reedy. Here is the ticket, hope this helps https://phabricator.wikimedia.org/T268273 [19:48:37] Thanks. I'll have a look/try myself in a little bit [19:57:46] Importing the citation templates has been on my TODO for a loooong time for a few wikis, so no hurry, but it'd be nice to finally get it done [21:04:34] what channel should I ask db questions in?