[00:08:33] hello [00:08:38] can someone help me with an error? [00:08:42] InvalidArgumentException from line 83 of /var/www/html/w/includes/resourceloader/ResourceLoaderImage.php: File type for different image files of 'apex' not the same in module 'ext.visualEditor.moduleIcons' [00:09:08] it appears in the console [00:09:16] also in visualeditor [00:09:23] im getting jQuery.Deferred exception: OO.ui.CardLayout is not a constructor [00:09:31] when i press the link button [00:15:53] Hi, I'm new to the joomla docs and I'm trying to upload an image but I'm not allowed because of a spam rule [00:16:21] this isn't a joomla docs forum is it? [00:24:29] Yellow: i suspect you have incompatible versions of MediaWiki and VisualEditor installed. you probably recently upgraded one of them but not the other [00:25:36] i think both are on git master [00:27:08] Yellow: git master of VisualEditor has no references to "CardLayout" [00:27:25] i deleted extensions [00:27:30] im gonna re-clone [00:29:44] turns out my extensions folder was way behind [00:29:55] well a little behind [00:30:57] yay it works [00:31:03] thanks so much MatmaRex [00:31:21] glad to help [09:57:39] Where can i delete an uploaded file? I configured my group as sysop but i do not see delete button in file page [10:54:45] So, I'm working on gerrit:384429. I've basically got a for-loop doing some db query, and it should COMMIT at the end of each iteration - so I $dbw->begin() at the start and $dbw->commit() at the end of each iteration. The SQL query log shows this works fine when calling my function from execute() in maintence script but doesn't when the same function is called from an MWCallableUpdate::doUpdate (deferred [10:54:47] update) nor when using a job and calling from it's run(). [10:55:56] I'm basically out of ideas what might be wrong. I'd expect it to either work from both (job and maintenance script) or not at all. [11:04:05] eddiegp can you link me to the code? [11:04:22] https://gerrit.wikimedia.org/r/#/c/384429/5 [11:04:41] what's the offending file [11:05:16] got it [11:05:29] Oh, that's includes/user/UserGroupMembership.php [11:05:56] purgeExpired() is the function that should be doing it. [11:10:50] so when you run that, you're not getting anything? [11:11:19] db unaffected, no errors? [11:11:27] eddiegp [11:12:29] So, when I call it from maintenance/purgeExpiredUserrights.php I get what I expect: [BEGIN SELECT DELETE INSERT COMMIT]. [11:12:54] But when it is called from the job, I only get BEGIN [SELECT DELETE INSERT] COMMIT (only the part in [] looping). [11:13:21] Errors neither in the wiki debug log nor in apache [11:13:47] so it's behaving like the transaction management is outside the loop [11:14:09] is it possible the job handler is starting it's own transaction negating yours? [11:15:03] https://www.mediawiki.org/wiki/Database_transactions says "execute() method of Maintenance scripts, the run() method of Job classes, and the doUpdate() method of DeferrableUpdate classes." are guaranteed to have outer transaction scope. [11:16:09] Which made me think the job handler shouldn't start any transaction (deferred update neither). [11:18:52] according to that page, you should of seen an exception if the transaction was already started earlier in the call stack [11:19:01] so that doesn't look like the issue [11:20:39] however if it works in one context and not the other, it's environmental [11:20:44] or suggests as much [11:20:48] so something else is different [11:21:23] try dumping our the db instance at the start of your loop to see what's going on there [11:21:27] to a log file [11:22:46] Okay. [11:23:08] fwiw, I've just put the query log in P6256 [11:23:36] Hmm, the bot doesn't link to pastes: https://phabricator.wikimedia.org/P6256 [11:35:12] hmm [11:35:58] the difference between 186 Query COMMIT /* UserGroupExpiryJob::run */ and 199 Query COMMIT /* Wikimedia\Rdbms\Database::commit eddie@eddie-thi... */ [11:36:04] has me curious [12:12:31] any luck eddiegp ? [12:12:42] not so far. [12:29:50] jgleeson: https://eddie-sh.de/debug-usergroupexpiry.log, although I don't know how helpful that is, it's quite a lot. [12:30:54] Any better way to dump the db object than redirecting var_dump( $dbw ) into a file? [12:31:33] It was dumped four times, each time the loop was run. [12:49:58] yeah that is a lot [12:50:24] I was hoping to find something indicating the transaction was holding already existing queries [12:50:42] as it would indicate your code does not own the transaction scope [12:50:59] I'll go through it in more detail in a bit, just trying to finish something [12:52:43] Reading a bit more into the mw-page from above I was wondering whether it might be related to DBO_TRX: "Calling begin() or commit() when DBO_TRX is set may log a warning and no-op." - I'll have a look whether enqueueing & running that job from the cli makes a difference. [13:24:16] Hmm, https://www.mediawiki.org/wiki/Database_transactions#Examples_2 (Case A/B) shows how it should be handled (no direct ->begin()/->commit() but using a transaction ticket (whatever that is) and LBFactory->commitAndWaitForReplication(). This seems to work for the job (but not the maintenance script). :/ [14:33:27] How do I use the ldap grp i signed in with in mediawiki ? [14:33:39] its putting me in the users grp [14:35:35] i set $wgLDAPUseLDAPGroups [14:35:40] as true but it didn't work [14:38:12] You've literally done $wgLDAPUseLDAPGroups = true; ? [14:38:22] no i used the correct syntax [14:38:39] $wgLDAPUseLDAPGroups = array( [14:41:22] I've just installed mw 1.29, and have staged some content in it. While logged in, I can see the content, skin, sidebar, etc. When someone not logged in visits the pages, they get a completely non-skinned, white page with blue links, vertical links for the nav bar, etc. [14:41:46] I checked $wgDefaultSkin, and its set to something valid, so why are they seeing a 'plain', unskinned wiki? [15:13:12] hmm access control is broken in 1.29? [15:13:31] Invalid or virtual namespace -1 given. [15:14:00] setuid: https://www.mediawiki.org/wiki/Manual:Errors_and_symptoms#The_wiki_appears_without_styles_applied_and_images_are_missing [15:25:15] any other extension i can use besides access control which is currently broken? [15:47:55] andre__: What I'm trying to do, is take the html output from the openstack-manuals project (rendered html from buildstream) and run it thorugh pandoc to produce markdown, which I then run though pandoc again to produce mediawiki format markdown (I can't do it in one pandoc step, there's a mess of divs that need to be stripped out) [15:48:23] I'm essentially doing: find . -type f -name '*html' | while read line; do pandoc -f html -t markdown-raw_html-native_divs-native_spans -o "${line%.html}".md "$line"; done; [15:48:27] then: find . -type f -name '*.md' | while read line; do pandoc -w mediawiki "$line" -o "${line%.md}".wiki; done; [15:48:39] But it produces some semi-broken mediawiki constructs [15:49:16] The output looks like: https://paste.debian.net/hidden/56996fb7/ [15:49:44] brion: You still working on mw? :) Sheesh, it's been ... what, a decade, since I was last in here converting Wikipedia to Plucker format on PalmOS devices :D [15:51:00] Something wonky with the sidebar nav too, doesn't support more than one top-level indent [15:53:59] guys if you are having an issue with access control bug namespace -1... There is a fix https://www.mediawiki.org/wiki/Extension_talk:AccessControl [15:57:42] Good times :) [16:02:30] can anyone point me in the right direction? I want to use ldap group on wikimedia instead of users group [16:12:21] Is there an easier way to get sidebar HTML into mediawiki markdown, without having to nearly touch every line by hand in an editor? [16:12:49] Converting things like: [16:12:51] == Getting Started with OpenStack[[#getting-started-with-openstack|¶]] == [16:12:53] to: [16:13:10] ==
Getting Started with OpenStack
== [16:13:11] is a pain [16:15:19] /c/c [16:15:40] ops :( [16:17:25] Sloppy, but effective: perl -pi -e 's,\=+(.*)\[\[\#(.*)\|\¶\]\] \=,\=\=
$1
\=\=,g' *wiki [16:25:09] Is there a way to provide Notice, Important, Warning, Tip, Caution, etc. style formatting for blocks of wikitext? [16:26:28] Wait, is this it? https://wiki.nci.nih.gov/display/WikiTrainFAQsTips/Creating+a+caution,+warning,+tip+or+info+box [16:28:03] blerp, that's confluence, n/m [16:30:57] setuid: you can make a template for them [16:31:13] e.g. {{notice|Your notice text goes here}} [16:31:17] I'm looking here: https://www.mediawiki.org/wiki/Template:Caution [16:31:20] but it's not clear how to actually make the template [16:31:30] you create a page in the Template: namespace [16:31:41] to use it, {{template name|parameters|go|here}} [16:31:43] A page with what content? What markup? What styling? [16:31:47] mediawiki markup [16:31:56] templates just inject that content into the page [16:31:59] *facepalm*, no kidding, but _what_ wiki markup? [16:32:05] You're not understanding the question [16:32:11] mediawiki markup [16:32:24] When I use {{Caution} Something here... _what_ puts the caution icon/red bounding box, etc.? [16:32:25] templates can contain anything valid in mediawiki [16:32:36] edit the page to find out [16:32:42] it's likely a
with either a style="..." or a CSS class [16:32:55] The page is blank, the template is blank. Ok, so basically edit raw HTML, point it to a png file, etc.? [16:33:18] https://www.mediawiki.org/w/index.php?title=Template:Caution&action=edit [16:33:22] there's no built-in methods to handle: warning, info, caution, notice, etc? Everyone does it by hand? [16:33:46] correct [16:33:50] ugh [16:34:20] see also https://www.mediawiki.org/wiki/Help:Templates [16:34:26] since that edit link is likely very confusing [16:34:35] due to tons of other crap that template page is doing [16:38:34] Ok, so something like: [16:38:35] '''
CAUTION
''' [16:38:35]
{{{1}}}
[16:38:52] I'll have to add some remote URIs to warning icons and such [16:39:12] or upload the icons locally [16:39:21] (image hotlinking is disabled by default) [16:39:22] Can't do that, so I'll link to remotes [16:39:54] This has to be HTML only, as an exportable format that can be imported into the "real" wiki once I've mangled all the content into a clean format [16:40:09] having to do this all by hand, is an enormous pain. What is this, 1987 againn? [16:40:29] is the "real" wiki also mediawiki? [16:40:35] Yes [16:41:36] if you have server access to both this wiki as well as the final one, exporting images is slightly time-consuming but not difficult [16:41:47] I don't have server access, nor do I have admin [16:41:54] ah [16:42:16] well, hotlinking images is disabled by default and needs either server access or admin to enable [16:42:37] so you may have issues going down that route [16:42:41] I'll include pngs with my export and have them put them in assets, link to them that way [16:43:38] do you have admin on the current wiki you're working on? [16:44:06] Yes, I've done a local install so I can work out the changes I need to make to the content [16:44:23] Once everything is clean and correct, we have to export everything as separate pages and import back into the other wiki [16:44:48] ok, so if you find templates for warning, caution, etc. on other wikis you like, you can export them from those wikis and import them locally [16:44:52] so you don't need to retype it all [16:45:04] there's a page Special:Export on every wiki that can export pages [16:45:09] That's what I was hoping to find, but nobody has examples that I can see [16:45:21] and a page Special:Import on your wiki that imports the dumps that Special:Export generates (Import requires admin access) [16:45:43] These really should be included/canned functions, templates that ship with the core, so you can reuse/change or simply use as-is, with the default install [16:45:47] https://en.wikipedia.org/wiki/Template:Warning [16:46:08] they also have a Caution and Notice template there [16:47:23] Export is disabled on main wikipedia site, it seems [16:47:27] Special:Export that is [16:47:32] No... shouldn't be [16:47:54] https://en.wikipedia.org/wiki/Special:Export works fine as anon [16:48:10] https://en.wikipedia.org/wiki/Special:Export?pages=Template:Warning%0ATemplate:Caution%0ATemplate:Notice&templates=1 [16:48:45] save that as export.xml on your computer, then upload that to your wiki's Special:Import [16:49:12] you should also add $wgUseInstantCommons = true; to your LocalSettings.php if it isn't in there already [16:49:22] (to get the images to show up) [16:49:38] Can't view the source, can't edit (expected), can't do much there, it's protected. [16:50:02] You can always view the source [16:50:20] https://en.wikipedia.org/wiki/Template:Warning?action=edit [16:50:29] Nope, using View Source option gives me a protected, very truncated (about 10 lines) of content [16:50:41] That is all the content [16:50:49] The problem is you need a chain of templates. So you want to use export to make your life easy [16:51:57] the link I gave exports all the related templates [16:52:06] you literally just need to save that file and import it to your wiki [16:52:12] and it'll give you all of the supporting templates needed [16:52:36] looks like Scribunto is required too [16:53:54] Ok, so that's a blocker too. [16:54:04] If it's not part of the absolute default install, then I can't use it [16:54:13] I can't assert plugins, external add-ons, nothing [16:54:33] I don't control the upstream wiki, and I can't require anything they don't already have (base install) [16:55:10] This really is a pita, and should come with the default install [16:57:24] What should? [16:57:29] What do you mean by "default install"? [17:01:01] Reedy: Some basic Info/Warn/Caution style templates for blocking out sections of text with those conditions, should come as part of the default install. The install you get when you unpack the tarball, set up your db, and start creating pages. [17:01:16] Many people wouldn't agree [17:01:20] It's something a large %'age of mw users will use right out of the box [17:01:40] It's easy to add yourself. Export makes it very easy [17:01:43] You still need some extensions [17:01:47] Except when it doesn't [17:02:12] The exporting is easy [17:02:26] Just because your wiki doesn't have the correct extensions installed to make it work, isn't our fault [17:02:32] Nor is it MediaWiki's fault generally [17:03:04] You don't need extensions to provide the 2 lines of markup I pasted above [17:03:23] It's a starting point, not a fully comprehensive, dynamic, Scribunto solution [17:08:14] vanilla mediawiki without extensions is nearly impossible to set up complex things in [17:08:32] the installer even comes with "standard" extensions [17:08:48] Of course, parserfunctions to scribunto migrations made some things harder [17:08:54] yeah [17:09:04] but it sounds like they don't even have PF? [17:09:13] which means using {{qif}} >_> [17:12:11] What's the right way to do inline css in the markup for a template, without having to use a mile-long:
..
style syntax? [17:12:15] Reedy: do you know if it's possible to export old revs of templates (like, "give me a snapshot of these templates as they all were on X date")? [17:12:20] templates don't correctly parse/render