[04:25:19] Hello everyone, Can anybody please help me to get started with contributing to wikimedia? I have previously contributed to three organisations : PublicLab,OpenRefine and Aerogear. I am proficient in MERN stack development. I am also willing to learn new tech stacks if needed [06:01:28] * saper looks up MERN [06:02:00] *oh* [07:16:53] Hi there, is it possible to make a template that outputs the unexpanded argument that is passed to it, eg [07:17:44] {{something|{{a|b|c}}}} renders as say {{C|1={{a|b|c}}}} ---> {{C|1={{a|b|c}}}} (which on the page is code-style formatting "{{a|b|c}} --> (whatever {{a|b|c}} expands to" [07:18:23] I got close with {{C|1={{{1|}}}}} [17:11:37] I've got something here that doesn't make sense. I've been trying to configure multiple wiki installs on the same testing domain (so just an IP), and the redirects are partially working. The rewrite log shows that things are being redirect to /w/, which does not exist. I also don't even have that rule in my htaccess. I've checked my LocalSettings thoroughly, as well, and there's nothing pathed to /w/. Any ideas on what's causing that? [17:11:59] https://pastebin.com/802UKZ0Y <- rewrite log https://pastebin.com/VVXHh9kF <- .htaccess [17:13:00] This setup is incredibly unconventional and I'm aware of that, btw. I took this over recently and am trying to configure a staging environment. [17:14:41] I'm just worried about the wiki rewrite at the moment. The others just loop infinitely, but I'll deal with those later. [17:50:10] jfolv: what kind of infra is there? [17:51:45] it must be apache since .htaccess? [17:51:55] Yeah, using apache [17:52:38] I realize I left some things out of that apache log, since I forgot I used a grep for that [17:54:00] But the path suddenly changes from /var/www/html/wiki/ to /var/www/html/w/ [18:09:26] What I really don't understand is that if it's redirecting to something that just flat out doesn't exist, then how is the wiki loading at all? [18:09:37] Everything functions [18:09:42] (Almost everything) [18:11:56] hmm [18:12:28] so what is at /var/.../w/ and what is in /var/.../wiki/ [18:12:50] not a symlink? [18:14:02] There's nothing at /var/www/html/w/, and /var/www/html/wiki/ is a symlink to the actual wiki files elsewhere on disk [18:14:22] The actual directory for the files isn't called w, either [18:15:27] have you checked the apache configs [18:15:44] Yes, I installed and configured apache myself [18:15:56] So I know it's not in there [18:16:38] gotta look everywhere I guess, it is somewhere :P [18:17:09] I'm just wondering if there's something else in MediaWiki that might be doing it [18:17:53] This whole setup is a nightmare in and of itself anyway. It's three wikis using the same files but different databases. The person who used to own this wrote custom code to contextually swap them based on URLs. [18:18:52] The production still uses this setup, but it works much better there because we have the luxury of subdomains [18:19:14] Same files is probably not a problem [18:19:35] "RewriteCond: input='/var/www/html/w' pattern='!-f' => matched" <-- what does the input mean here? [18:20:04] maybe it is the custom code? could you show that [18:20:26] (and just to point out, I'm not exactly a mediawiki pro) [18:21:27] Hold on, let me produce some more logs and tidy up the customizations for posting. [18:27:33] what other settings does the rewrite module impose? [18:27:44] Does it have some global ones [18:37:18] Okay, https://pastebin.com/eLxu5Qvu this is the LocalSettings. Custom.php is a file that contains usernames, passwords, and hostnames for the different wikis and IPs. Since this is a staging site, a lot of the normal functionality is unused. [18:39:43] But just thinking out loud, I'd say that the apache rewrite happens before the MW application is even touched, so it probably shouldn't have anything to do with this? [18:42:47] Actually, looking at the log shows that load.php gets called and tested against the rewrites first (which obviously fails to match because of !-f) [18:43:09] well that's something [18:43:14] Load.php is going through the correct directory /var/www/html/wiki/ [18:44:22] Then immediately after that it starts listing /var/www/html/w/, which actually fails against the rewrite. That explains why this site specifically isn't infinitely redirecting itself. [18:44:30] But it still doesn't explain what's altering the path to /w/ [18:46:18] The other two wikis don't change the path to /w/, which is why that normally overreaching htaccess will just continue to catch the /arch/ or /news/ and append it again until it results in a string of /arch/arch/Arch/Arch/ etc and crashes [18:49:22] What's in `InitialiseSettings.php` [18:51:03] Ah, that one's customized too! This might be what's causing this, hang on... [18:53:40] If I'm correct though, this should be a default MediaWiki file and shouldn't normally be customized [18:53:59] No idea about that honestly [18:54:55] Gonna check another wiki I admin that runs a more vanilla setup; let's see what it looks like there... [18:57:18] Well that's new. Looks like this is a custom file. It's given me some new things to look at. [18:58:27] InitialiseSettings.php isn't a MediaWiki file, it's a WMF production thing [19:00:52] Interesting. It does have a setting for a default script path to be /w/, but even after changing it and logging another request, I still see the /w/ in the log. [19:04:34] did you reload the web server? [19:05:04] vaguely remember that you might need to do something like that with apache? [19:06:17] Yes, but it still shows that same /w/ [19:08:41] grep all the files for /w/ ? :) [19:23:00] There's quite a hefty output for an rgrep there, so I'm working on trimming out the fat. Definitely not a bad idea though. [20:11:52] Well, I'm just going to go ahead and say that this is in no way worth the time I'm spending on it. It's a staging environment, the wikis are all usable, and while this is definitely a suboptimal configuration, it at least isn't a production server. Thank you for your help anyway, harmaahylje. [20:15:28] too bad