[13:31:03] hi [13:31:43] i have a pb i migrated my mediawiki ( new version + new server ) and now i don't see the images added by the users ( with the old version ) [13:31:48] does someone have an idea ? [13:34:33] hi (I'm here for the same question as neoclust, we're trying to debug this) [13:35:34] https://wiki.mageia.org/en/Drakconf [13:35:41] for exemple a page with the pb [13:41:44] On est sûrs que l'histoire de /dev/null n'a rien à voir ? [13:42:00] Il me manque deux images sur la page Drakconf et il y a deux errors /dev/null [13:43:42] oops wrong channel [14:07:02] I uploaded a file at https://wiki.mageia.org/en/File:Test.jpg [14:07:21] But I can't find this Test.jpg file anywhere on the server [14:07:51] There's obviously something wrong, probably in our configuration, but there are no useful logs :) [14:33:32] !debug | stormi [14:33:32] stormi: For information on debugging (including viewing errors), see https://mediawiki.org/wiki/Manual:How_to_debug . A list of related configuration variables is at https://mediawiki.org/wiki/Manual:Configuration_settings#Debug.2Flogging Also see https://mediawiki.org/wiki/Manual:Errors_and_symptoms [14:34:11] I guess this'll be hard to figure out without some error message... [14:37:25] it *is* hard :) [19:13:33] So, it looks like we have a mismatch between apache's configuration (images in /srv/wiki/en/images) and mediawiki's configuration (looks for them in /var/www/mediawiki/images and I don't know why). [19:13:46] Have you seen that kind of configuration error in the past? [19:14:29] Who is we? [19:15:12] oops, we is neoclust and I, we were here at 16:00 UTC approx [19:17:02] Reedy: hi [19:17:27] Are you using debian packages? [19:17:42] MW would only look for hard coded paths like that if you'd added them to LocalSettings or similar [19:18:04] Reedy: no, not debian packages [19:18:13] Reedy: i think we hardcoded new path [19:19:11] * The URL path for the images directory. [19:19:12] * Defaults to "{$wgScriptPath}/images". [19:19:12] */ [19:19:12] $wgUploadPath = false; [19:19:28] So look for that and $wgScriptPath in LocalSettings [19:20:02] $wgScriptPath = "/mw-$wgLanguageCode"; [19:20:13] but i don't have $wgUploadPath [19:20:36] $wgScriptPath = "/en"; [19:21:26] Reedy: this is what i have [19:21:53] But maybe our packaging of mediawiki wrongly hardcodes some paths? [19:21:59] I suppose we use our own RPM [19:22:06] Which of those? You can only have either $wgScriptPath = "/mw-$wgLanguageCode"; or $wgScriptPath = "/en"; [19:22:58] From what it looks on your wiki, you have $wgScriptPath = "/mw-$wgLanguageCode"; That resolves to "/mw-en/" and is your script path according to Special:Version [19:24:51] eddiegp: we need to remove $wgScriptPath = "/en"; ? [19:25:10] eddiegp: sound logical we can't have both, you are right [19:25:37] If you don't have $wgUploadPath set within your LocalSettings.php it will default to "{$wgScriptPath}/images", just as reedy said. Hence that'd be /mw-en/images/. Which is exactly where your mw installation looks for images, see for example https://wiki.mageia.org/en/File:Mageia5.png . The image is found at https://wiki.mageia.org/mw-en/images/9/9e/Mageia5.png [19:27:38] eddiegp: strange, that it finds some images, don't find others ( https://wiki.mageia.org/en/Drakconf ) and that we can't upload new ones [19:27:58] But whenever I upload an image, it goes to /var/www/mediawiki/... [19:30:21] Do you have $wgUploadDirectory (as opposed to $wgUploadPath) set anywhere? [19:30:46] eddiegp: no [19:30:55] eddiegp: i don't see it on my config file [19:31:20] Could you paste your config file (without passwords and other sensitive stuff into a pastebin? [19:31:51] eddiegp: no need, we store it in git [19:31:56] eddiegp: i find you the link [19:32:35] eddiegp: http://gitweb.mageia.org/infrastructure/puppet/plain/modules/mediawiki/templates/LocalSettings.php [19:33:00] looking [19:44:52] That does not seem to be the version you're actually running right now. [19:45:36] eddiegp: it is, we tried to migrated from our previous config file. [19:45:41] eddiegp: it is, we tried to migrate from our previous config file. [19:47:32] neoclust: it could be different, since gitweb is not updating anymore IIRC [19:47:41] Well https://wiki.mageia.org/en/Special:Version says your article path is /en/$1. That's not the default (/wiki/$1), so somewhere $wgArticlePath has to be set ... [19:48:04] But that variable isn't even in the file... [19:48:41] $wgArticlePath = "/$wgLanguageCode/$1"; [19:48:47] i have this in my conf file [19:49:00] ok [19:49:04] i understand why [19:49:13] <%= wiki_settings %> [19:49:15] i show you this too [19:49:46] eddiegp: http://gitweb.mageia.org/infrastructure/puppet/tree/deployment/wikis/templates/wiki_settings [19:50:12] eddiegp: sorry, with this you have more infos :) [20:02:04] So, both of these files will be included in the configuration, right? [20:02:21] yes [20:04:16] eddiegp: yes the second one is at the end of the first ( instead of the <%= wiki_settings %> ) [20:04:22] eddiegp: puppet language [20:05:03] Yeah, I've only read a few bits about that ... Digging into puppet is another thing on my todo-list ;) [20:05:50] When you're on your server, where are all these mediawiki script files? /srv/wiki or /usr/share/mediawiki/ ? [20:06:37] eddiegp: /srv/wiki [20:07:03] Well, then $IP shouldn't point to /usr/share/mediawiki [20:07:31] eddiegp: let me look more [20:07:50] there are a lot more files in /usr/share/mediawiki :) [20:08:25] I suppose you guessed that we are not the ones who set it up in the first place :p [20:08:50] Yeah :D [20:09:43] Looking into your puppet repo, it seems the apache vhost points to /usr/share/mediawiki. However you've told mediawiki that it lives in /usr/share/mediawiki by pointing $IP there. [20:10:01] Sorry: The apache vhost points to /srv/wiki [20:10:29] yes, and the configuration files are in /srv/wiki [20:10:47] eddiegp: in fact mediawiki is installed throught the rpm, ( in /usr/share/mediawiki/ ) but config file is in /srv/wiki/ with some files ( but with a link to /usr/share/mediawiki/ ) [20:11:03] It's probably a separation between instance-dependent files and files belonging to the system package [20:11:11] for ex we have /srv/wiki/en/index.php -> /usr/share/mediawiki/index.php [20:11:21] this was for this yes [20:11:35] we "had" en fr de wikis [20:11:41] but now only the english one [20:11:44] this is quite a mess [20:11:53] not mediawiki but current layout :) [20:14:06] Where does /srv/wiki/en/images point? [20:14:33] eddiegp: to /srv/wiki/en/images [20:14:35] :) [20:14:38] eddiegp: this is not a link [20:15:04] As far as mediawiki is aware, you're install path is /usr/share/mediawiki. You should find all images you've uploaded within some subfolder of /usr/share/mediawiki/images. [20:15:17] *your. [20:15:22] which is not writable [20:15:47] eddiegp: can't we "force" to use /srv/wiki/en/images as upload path ? [20:19:07] Yeah, put $wgUploadDirectory = "/srv/wiki/en/images"; into your mediawiki config. [20:24:18] ok i try :) [20:28:35] https://wiki.mageia.org/en/Drakconf looks good to me by now ... though I'm not aware of anything that might have done that :D [20:29:24] eddiegp: AWESOME [20:29:31] eddiegp: i add this in puppet now :) [20:29:41] stormi: can you try to upload a file ? [20:30:28] I've just purged a few pages, e.g. https://wiki.mageia.org/en/Documentation. You likely still have a lot of pages in cache that will be good once you get them re-parsed. [20:33:04] Upload worked: https://wiki.mageia.org/en/File:Test.jpg [20:33:14] You might want to run the maintenance file https://www.mediawiki.org/wiki/Manual:PurgeList.php to have all pages purged from cache [20:33:32] is there a command we can run to purge them all? [20:33:43] oops you just said it [20:34:35] stormi: ok i do this [20:35:14] hum [20:35:17] php purgeList.php --purge < purge.txt [20:35:18] where purge.txt contains a list of URLs or pagenames to be regenerated. [20:35:50] ah :) [20:35:51] --all [20:36:51] Done! [20:36:54] :) [20:37:26] Have a look whether it had worked, I'm not quite sure that is the right maintenance file. Overread the "this is for squid" part. [20:39:41] neoclust: we are talking about parser cache? Try refreshLinks.php [20:40:52] Also, any time you edit LocalSettings.php will normally purge all pages (by default. It may depend on your config) [20:41:40] bawolff: tks i am trying refreshLinks.php [20:41:48] but eddiegp tks wiki seems fixed now :) [20:41:57] our users will be able to work now :) :) :) [20:42:09] and docteam [20:42:15] You're welcome :)