[02:15:55] Is there any way to use Page Forms to create File pages, with metadata about the uploaded file in a cargo/smw template? [14:38:21] hi, running showJobs.php does not work for my mediawiki-1.31.5 installation, the error message does not help me: https://paste.ubuntu.com/p/RjcTCQWjTR/ [14:38:46] any ideas on: /var/www/html/mediawiki-1.31.5/includes/SiteConfiguration.php: No such wiki 'mediawiki-mediawiki'. [14:39:10] the ID of the wiki is defined in LocalSettings.php, and is not mediawiki-mediawiki :( [19:41:08] subbu: cscott_away: do you know if the increase on the bottom right here plausably aligns with parsoid-php roll out? https://grafana.wikimedia.org/d/yVf-D1RWk/arc-lamp?orgId=1&from=now-7d&to=now [19:41:26] i've seen numerous fatals with stack traces that were too deep for our infra, no major impact other than reduced telemetry [19:41:47] not sure if those parsoid ones were just anecdotal bias or not [19:43:37] hmm .. hard to say ... the timeline seems to match up though. [19:44:39] it could be ... parsoid has a lot more OOMs and maybe those stack traces are too deep? [20:18:53] any ideas why an edit might try to insert a null for text.old_id? [20:28:58] ah, nm [21:53:25] Hi, I'm doing a db query Query: SELECT COUNT(*) as total FROM recentchanges WHERE rc_user_text=(the user name) AND rc_type=1 GROUP BY rc_type and I'm getting Error: 1054 Unknown column 'the user name' in 'where clause' [21:53:30] Why? [21:54:03] With mw 1.34 it's working with 1.31 not and I checked the table [21:54:09] are you using that literally? [21:54:10] what could it be? [21:54:20] of corse not [21:54:25] you should have replaced «(the user name)» with the username [21:54:33] user name is a real user name [21:54:52] did you put single quotes around it? [21:55:02] no [21:55:10] that's your error [21:55:22] it's not taking it as a string, but as another column [21:55:26] which then doesn't exist [21:55:31] thus the error given [21:55:31] so in 1.31 you need to use single? [21:55:56] uh? no [21:56:05] that's general [21:56:15] ooh ok [21:56:21] let me check [21:56:22] rc_user_text=martin0020 is broken everywhere [21:56:35] depending on your db version, you may be able to use perhaps double quotes, too [21:56:49] but I think SQL-92 specifies single quotes [21:56:56] and is what every db will support [21:57:38] damn, stupid me. Thank you very much for the fast help and explanation Platonides [21:57:44] you are welcome, martin0020 [21:57:59] sometimes, it takes a new set of eyes in order to realise the problem [21:58:43] note that in the last versions of mediawiki, that query will fail [21:59:10] the column rc_user_text is gone, and you will need to use rc_actor instead [22:03:23] Thank you Platonides I know. In 1.34 I'm using rc_actor [22:03:49] :) [22:03:53] and because of the int you don't need the quotes [22:04:06] so that was my fail :) [22:04:08] it's a number, not a string [22:04:17] yes [22:05:50] maybe a last question Platonides for more then a row I'm using while($row = $dbr->fetchRow($total_between)){ [22:05:58] is that a good way of doing it? [22:06:27] it has been a long time since I did SQL in mediawiki [22:06:32] but it's probably right [22:06:39] was that query done inside mediawiki? [22:06:41] ok [22:07:00] you can do a foreach these days :P [22:07:12] well today is my first day with sql [22:07:19] that's PHP, not sql ;) [22:07:27] if you are calling it from inside mediawiki code [22:07:40] right, but first time sql query in php [22:07:42] there's a select() helper function that will take care of quoting the strings [22:07:53] also, if it's your first time touching SQL from php [22:08:07] your code is likely to have a SQL injection vulnerability there [22:08:26] I know I'm putting next the ? in [22:08:38] wanted first to check the query [22:11:01] so Reedy if I would do with foreach would it work like this foreach ($total_between as $key => $value) { [22:11:10] I'm also new to php [22:11:20] There's only the value [22:11:30] We usually do foreach( $res as $row ) [22:11:34] res being "result" [22:12:12] here you will get a single answer [22:12:25] so you don't really need to loop [22:13:23] ah ok so then I have to do $res["rc_type"] and $res["COUNT(*)"] to get the values [22:13:23] Probably wants to use one of the other select functions too [22:13:32] $res->rc_type [22:13:50] I have also a query with multiple row Platonides [22:14:13] for the single query [22:14:16] for the single-result query [22:14:35] there is a function $dbr->selectRow() that is your friend [22:14:45] ok thank I will also check this out [22:15:26] There's also selectField if you just need one column/field of one row [22:15:50] something like $dbr->selectRow('recentchanges', [ 'COUNT(*)' ], array( 'rc_user_text' => 'martin0020' ) ) ; [22:15:50] I need to copy & paste your answers so I don't forget the stuff :) [22:55:30] Hi guys - having a bit of trouble implementing infoboxes and can't many answers via Google [22:58:35] This is what happens when I try to invoke the "Infobox Location" template https://usercontent.irccloud-cdn.com/file/s5gE28eM/1583449083.JPG [22:59:31] And that's the template https://usercontent.irccloud-cdn.com/file/cB5wV1ID/1583449157.JPG [23:01:00] And the TemplateStyles extension seems to break the wiki [23:01:27] Where did you get that syntax from? [23:03:18] I think from a fandom wiki that uses the same wiki software [23:03:48] The other guides I found were of me getting caught in the ceiling fan [23:04:00] (Instructions not clear enough idk if you like memes) [23:04:29] I dunno if they have some custom extension for doing it... [23:04:41] But would only work if the browser understood it [23:04:50] An infobox syntax usually looks more like https://heliosanctus.fandom.com/wiki/Custom_HTML_Infobox [23:07:57] Is there not a way to do it with a template? [23:08:22] All the others I found invoke a template using {{infobox}} [23:08:50] Yes, they do [23:08:54] But eventually, that's what is done [23:09:54] Would there be any chance you could tell me the best way to make an infobox template that works? [23:10:02] Please:D [23:10:35] Problem is there is far too many variations to just tell you how it works [23:10:44] And if you take examples from Wikipedia these days, you also need Scribunto [23:11:04] Ahh [23:11:12] I'm still curious to see where you got your version from [23:11:28] Pretty sure it was he same fandom site [23:11:40] As you linked me to, might be wrong brb checking for you [23:12:54] https://community.fandom.com/wiki/Help:Infoboxes [23:13:45] Yeah, there's the answer [23:13:45] https://community.fandom.com/wiki/Special:Version [23:13:59] is registered as a parser extension tag [23:14:04] So you need the extension on your wiki [23:14:37] I think it's https://github.com/Wikia/app/tree/dev/extensions/wikia/PortableInfobox [23:14:57] oOo [23:15:01] Thank you! [23:15:05] The problem is Wikia extensions potentially depend on changes that they have on their wiki only [23:15:55] I just literally want to use infoboxes and can’t find a standard way [23:16:04] I’d have thought it would just be a plug and play extension [23:16:21] It's a bit difficult to do when there's no standard idea of what one is [23:16:22] First time wiki’ing [23:17:33] It’s cool, I’ll probably just go without tbh [23:17:42] It’s not for work it’s just a hobby [23:17:52] the most portable way is just to use a template [23:18:37] Yeah but idk how to make it invoke the template properly or even how to create the template properly and I can’t find a “typical” way of doing that [23:19:22] you could copy something like https://en.wikipedia.org/w/index.php?title=Template:Infobox&action=edit&oldid=250778832 [23:24:56] Tried it but it translates to this https://usercontent.irccloud-cdn.com/file/gSDd0Pss/1583450682.JPG [23:27:10] No [23:27:21] That's if you use the newest version of the template it will [23:27:22] I did it wrong didn’t I [23:28:48] I have no idea how you get your head round all this lol [23:32:35] use the link I provided [23:32:54] that's an old version which doesn't require Lua modules [23:33:00] only ParserFunctions [23:36:38] Saved but now is on about Template:Pp-template [23:37:12] Although there is a slither of an infobox on the right! [23:40:26] Platonides: thank you!!! [23:40:37] Is there a documented syntax to use with it? [23:40:41] you are welcome :) [23:41:24] see the docs at https://en.wikipedia.org/w/index.php?title=Template:Infobox&oldid=250778832 [23:42:42] Yay I’m so happy! [23:42:49] :) [23:42:50] Fourth day trying to figure it out [23:42:59] Thank you for doing the figuring out for me lol [23:57:48] @Volker_E quick question: the SVG recrunching patch would be properly placed in https://phabricator.wikimedia.org/T178867 ?