[01:54:02] what's the kosher way of installing the vector skin via composer? The latest published version on packagist seems to be outdated [01:55:20] or do I need to specify the version like [01:55:20] dev-REL1_34 [03:03:58] Sazpaimon: did you figure it out? i haven't used composer [03:04:29] I switched my version number to dev-REL1_34 instead of the actual published version numbers and that seemed to work [03:05:52] good [06:03:56] it's a shame packagist can't be auto-updated from jenkins when a repo is tagged [06:05:24] Reedy: I think you are able to do a manual update on https://packagist.org/packages/mediawiki/vector-skin ? [07:25:13] Are links to external sites in the main (0) namespace? I would have thought they had a different number to differentiate them from normal articles. [07:50:56] adrian_1908: what do you mean? Links to external sites can be on pages in many namespaces. [07:57:24] samwilson: I assumed since e.g. links to Talk pages have a different namespace than links to regular articles, that external links would also be differentiated. [07:57:43] I'm talking about the pagelinks table in particular here [07:58:43] oh right, no I think you're looking for the `externallinks` table then https://www.mediawiki.org/wiki/Manual:Externallinks_table [07:58:45] Hi adrian_1908. [07:59:05] You're conflating external links and page links, yeah. [07:59:25] The former are like https://example.com while the latter are like [[talk:hello]]. [07:59:47] So pagelinks is a superset thereof? [08:00:12] pagelinks is only wiki links. [08:00:14] no, pagelinks is just internal links [08:00:20] externallinks is only external links. [08:00:25] hehe yeah (snap) [08:00:40] There's an edge case of people using external link syntax for internal pages. [08:00:42] But w/e. [08:01:08] I see. I probably ran into the latter then! [08:02:35] https://en.wikipedia.org/wiki/Laurence_Houlgate#Books [08:02:47] adrian_1908: Within internal links, we do track relationships enough that you can see the target namespace and source namespace. [08:02:48] I take it these shouldn't be in [ ] brackets then? [08:03:26] Well, we shouldn't be linking to amazon.com there at all. [08:03:26] Or is that needed for the custom link text? [08:03:30] But that's a local wiki policy. [08:03:44] Both external and internal links support link naming or labeling. [08:03:57] [https://example.com text here] v. [[example page|text here]] [08:05:17] Ok, thanks. These links show up in pagelinks as namespaces 0 → 0, which I had (falsely) relied on not being the case. [08:06:44] adrian_1908: If you're talking about those amazon.com links, they will only be in the externallinks table. [08:06:49] They won't be tracked in pagelinks at all. [08:30:18] Ok, figured it out. A link was malformatted for a certain period and that caused it to be stored in a pagelinks table dump. [08:31:06] It was formatted as a regular [[page link]], as you hinted at. [10:19:01] Hi everyone, what is the simplest way to add a tag to an article. I have about 700 articles and I want to add to only to this articles a special tag. What is the easiest way to do it? [10:20:03] By tag do you mean a parser tag? (like ), a category or a revision tag? [10:22:10] Vulpix it's a {{ }} [10:22:27] Magic word I think it's called [10:24:42] Should it be appended to the page (at the end of the current text), as a replacement of other text, or is it something more complex? [10:26:25] It should be added at the end of the content of the page [10:26:31] so at the bottom [10:26:42] nothing to replace, simply to add [10:27:37] but I'm not that much in coding. So that's why I'm hopping there is maybe a solution to use an extension :) [10:33:45] Vulpix I know that there is the api stuff, but it looks pretty complicated [10:34:33] if you have all links to the articles, how hard is it to add the {{}} to the pages using the api? [10:38:32] I was about to suggest pywikibot, but looks like it can only replace one text with another, but not append... or at least I don't see an easy option to do that [10:39:31] the edit api has an option to append text to a given page, but you'll have to code it yourself, which may not be an option for you [10:44:04] Vulpix if there is no other way, I will try it. [10:44:41] could maybe that help me appendtextAdd this text to the end of the page. Overrides text. [10:44:47] https://www.mediawiki.org/wiki/API:Edit/tg [10:45:11] lorettk: I think I've overlooked it. It may be possible with pywikibot: https://www.mediawiki.org/wiki/Manual:Pywikibot/add_text.py [10:50:25] Vulpix puuh pywikibot looks complicated :D and it looks like it needs an account. But we can't create accounts, because of the auth method we are using. [10:50:39] In this example they preappending stuff [10:50:40] Prepend __NOTOC__ to a page.api.php?action=edit&title=Test&summary=NOTOC&minor=&prependtext=__NOTOC__%0A&basetimestamp=2007-08-24T12:34:54Z&token=123ABC [10:51:02] so could this possibly work with appendtext [10:52:01] Yes, it would work. Note that the edit must be a POST request, this means you can simply paste that URL on your browser [10:52:07] So I take api.php? and then append the stuff to the URL I need right [10:52:39] If you have shell access to the server, another option is to use the maintenance script https://www.mediawiki.org/wiki/Manual:Edit.php [10:53:20] That way it won't require login [10:54:11] so I write a script with all the Titles I need to change and I pass it to the Manual:Edit.php? [10:54:38] better said I call from the loot the Edit.php right? [10:54:43] loop [10:54:45] not loot [10:56:42] You can write a small shell script that calls getText.php to get the text of the page, append your new text to it, and then call edit.php with the new one, as in the example of that page. Then call that script with the list of titles [10:59:43] I see [11:00:09] thank you Vulpix that could work. Thank you very much [11:00:18] yw [11:06:53] Vulpix last question, only if it doesn't work from shell, what is this [11:06:55] tokenA "csrf" token retrieved from action=query&meta=tokensThe token should always be sent as the last parameter, or at least after the text parameter.This parameter is required. [11:07:18] I tried it from URL only to test it and it wants this token [11:09:15] You need to get a token by calling https://www.mediawiki.org/wiki/API:Tokens [11:09:32] a token of type=csrf [12:46:51] samwilson: Yeah... But we don't support installing via composer... [15:44:07] Hey all, as part of our recent upgrades, I installed the MobileFrontend extension (along with the MinervaNeue required skin). I'm told that there is an issue where some anonymous desktop users are occasionally getting served the mobile skin rather than their setting. Anyone encountered this before? [15:53:34] not for quite a while - but - you should probably post on the talk page for the extension rather than here so someone can give a bit more detailed help and/or investigate the issue [16:01:46] I think I may have just figured it out. I had added the Varnish config here (https://www.mediawiki.org/wiki/Extension:MobileFrontend/Configuring_browser_auto-detection#Detection_using_Varnish:_same_domain_for_desktop/mobile_site) but didn't add "$wgMFAutodetectMobileView = true;" as it says, so that could be the issue. I'll have to go test that. [16:13:46] The default of $wgMFAutodetectMobileView was changed to true a while ago IIRC [16:51:13] is there some sort of escaping I need to be doing for reassigning edits from an ipv6 to the corresponding user account [16:51:34] because there are 2 edits and the script is completing without reassignment [16:52:11] Which script? [16:54:01] reassignEdits.php [16:55:29] Any output? [17:07:17] Hi, I'm porting a MW installation from 1.31 to 1.34 and having issues with ParserOptions::getEditSection() that was dropped. Can someone point me where can I find more info about the stateless options params that should be used instead? [17:10:02] absor70: https://github.com/wikimedia/mediawiki/blob/REL1_31/includes/parser/ParserOptions.php#L868 [17:11:36] Reedy: thank you! [18:03:30] Vulpix, I don't even see the variable $wgMFAutodetectMobileView anywhere in all of the MW code, extensions, or skins except for in some MobileFrontend php untit test files when doing a grep -ri of it from the top level, so I'm confused where it's even being set let alone used. [18:06:33] you'll probably wanna grep for "MFAutodetectMobileView" instead of "$wgMFAutodetectMobileView" or "wgMFAutodetectMobileView" given that the wg prefix is kinda "hidden" when the configuration variables are accessed via a Config object [18:07:09] Doh! Thank you. :) [18:09:04] In that case, since it does indeed default to true, this may not be the solution to the problem, which leaves me in a more confused state. I suppose it could be related to the Varnish config I added regarding X-WAP headers but that was also from the same docs, and the problem is hard to reproduce (assuming it's not actually fixed for some odd [18:09:04] reason). [19:47:21] hi brion [19:47:58] * brion waves [19:48:01] does `echo "foo" > .env` work on windows powershell / cmd.exe? [19:48:32] so, specifically is it the `MW_DOCKER_UID=$(id -u)` bit that is breaking when you follow the instructions? [19:48:52] kostajh: echo "foo" > .env works but not multiline in cmd.exe [19:49:03] and in powershell the $(id -u) interpolates to empty string [19:49:11] in cmd.exe the whole thing just barfs [19:49:59] i'm not sure if MW_DOCKER_UID /GID are needed on windows, if it's something to do with unix permissions on filesharing [19:50:05] no, they are not [19:50:14] so I will move those to the Linux host section [19:50:19] excellent [19:50:24] where we know `echo` will work anyway :) [19:50:28] :D [19:50:40] simplest for the rest is "plop these lines in your text editor" ya [19:50:57] ok lemme double-check it works as expected when i do this manually :D [19:51:47] running docker-compose up -d .... [19:51:55] so far so good [19:53:07] running composer..... (churn churn churn) [19:54:55] and now i enjoy the single-threaded nature of php on my 8-core machine. doop-dee-doooooop dum de dummm waiting :) [19:56:05] brion: :) [19:56:20] I tagged you on https://gerrit.wikimedia.org/r/c/mediawiki/core/+/586428, not sure which of PS1 or PS2 wording is better [19:57:39] i like saying what it's for :) but it's also good to clarify where it is :D [19:57:57] i think the where is more important tho [19:58:03] so the ps2 wording is fine by me [19:59:28] k [20:00:16] ok running the install.sh now \o/ [20:00:27] "MediaWiki has been successfully installed" [20:00:28] success! [20:00:57] kostajh: looks good :D [20:01:12] yay :) [20:01:14] thanks for testing [20:01:16] lemme poke at gerrit [20:01:22] sure thing! [20:01:30] i gotta keep this windows machine around for something ;) [20:02:29] ugh, i'm having internet troubles with comcast again [20:02:34] that explains why gerrit keeps crapping out for me [20:12:50] brion: that's happening to everyone with comcast, lot of people being sent home for work and everyone piping up the company VPN and clogging their tubes, it's been terrible the last couple weeks. myself included [20:17:53] Yeah, it's super annoying because it's not every route, just ... The ones i need for work haha [20:59:22] Hi, im keep getting from time to time some categories "unsynced" with the pages they contains. I see category with a page "A", but when go into the page "A" i cant see the category (it should not be in this category). If i run null edit on this page that does not refresh the category [20:59:51] That happen a lot in my wiki, im trying to run refreshLinks manually each time i see it but its a long process and frustrating, how i can start to figure out why that happen? [20:59:57] Ofc there is not jobs on the queue [23:24:31] heya guys... i think english wikipedia shit itself again. it's giving Database query errors [23:24:39] Wikipedias are down? I'm getting database errors on en and de Wikipedias but not on en Wikivoyage [23:24:44] Database error [23:24:46] https://phabricator.wikimedia.org/T249565 [23:24:46] Jump to navigationJump to search [23:24:47] We know [23:24:48] A database query error has occurred. This may indicate a bug in the software. [23:24:50] [Xou6LwpAMOIAAvh3@@gAAACL] 2020-04-06 23:24:31: Fatal exception of type "Wikimedia\Rdbms\DBQueryError" [23:24:51] Everything is down https://phabricator.wikimedia.org/T249565 [23:24:52] ooh ok [23:25:18] i thought i broke everything by clicking on [[Silcion Graphics]] :P [23:25:31] *Silicon [23:34:00] hey there! quick question: what is the best/fastest way to get the external links per each revision of a given page? I'm currently getting the full list of rev_ids per page, but then I need to do individual calls (or get and parse the content) per revision, but this is very inefficent [23:50:50] dsaez: only the external links of the last one are saved [23:51:10] for earlier revisions, either the server or you need to parse it [23:51:22] (it might be cached, though) [23:52:15] Platonides, thanks, got you. Thanks [23:52:49] so regarding my original question about composer extensions, i've composerized all of the bundled extensions because it seems the vast, vast majority of extensions arent available on packagist. Is this a common practice? [23:53:05] I've basically ended up with a 500 line composer.local.json [23:53:34] Yes [23:53:46] We don't support extension installation from composer/via packagist [23:54:18] thats not what the docs say [23:54:19] https://www.mediawiki.org/wiki/Composer/For_extensions [23:55:04] >You can use Composer to install MediaWiki extensions which include a composer.json manifest and are published on the Packagist package repository. [23:55:15] there's a handful of extensions on packagist, but the actual version tags don't seem relevant and you still need to check out branches directly [23:55:21] example: "mediawiki/admin-links": "dev-REL1_34" [23:55:22] Most are not published [23:55:37] despite the fact that admin-links does have tagged version numbers, though the version numbers dont seem to mean anything [23:56:41] See also https://www.mediawiki.org/w/index.php?title=Composer%2FFor_extensions&type=revision&diff=3760871&oldid=3758196 [23:58:01] why is composer not supported? [23:58:04] wait what [23:58:16] i'm not using it but i'm seeing it mentioned pretty often, i thought it was a good thing [23:58:37] composer is used pretty much all over the place in the cms space [23:58:47] what MW core does (mandatory dependencies via composer -- the vendor/) dir is not necessarily what extension authors do :) [23:59:01] i'm not sure why mediawiki is the odd man our [23:59:03] *out [23:59:08] (and I can't seem to use parentheses properly. oh well.)