One assumes the image has been uploaded?
----- Original Message ----- From: nakohdo Frank.Ralf@gmx.net To: mediawiki-l@lists.wikimedia.org Date: Mon, 10 May 2010 09:43:51 -0700 (PDT) Subject: [Mediawiki-l] Image links don't work on subpages
When I insert an image link on a subpage like [[Image:My picture.png]] the image won't show but only a link to the image page. I'm surely only
missing
an important settings but which one?
tia Frank -- View this message in context:
http://old.nabble.com/Image-links-don%27t-work-on-subpages-tp28512486p285124...
Sent from the WikiMedia General mailing list archive at Nabble.com.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Frank Ralf wrote:
One assumes the image has been uploaded?
Yes, the very same link on the parent page does work alright.
Are subpages actually enabled for that namespace? The easiest way to check is to see if the breadcrumb link to the parent article is present on the top of the subpage.
If it's not there, subpages aren't actually enabled. They /kind of/ work, but a lot of weird things happen. It's been a while, but I think this exact thing happened to me.
To enable it for that namespace, look into the $wgNamespacesWithSubpages variable in LocalSettings.php.
Hi Sean,
Are subpages actually enabled for that namespace? The easiest way to check is to see if the breadcrumb link to the parent article is present on the top of the subpage.
Yes, they are enabled. I have enabled them for the main namespace and tested also with user pages where subpages are enabled by default.
I had a closer look at the generated HTML and found that both wiki links create the same HTML:
<img src="../wiki_uploads/5/51/My_picture.png" />
That relative path is wrong for a subpage as there's one path level missing. So I suppose the problem has something to do with my path settings.
Thanks for your help Frank
I had a closer look at the generated HTML and found that both wiki links create the same HTML:
<img src="../wiki_uploads/5/51/My_picture.png" />
That relative path is wrong for a subpage as there's one path level missing. So I suppose the problem has something to do with my path settings.
I found the solution. I had to change the upload path so it includes the article path like so:
$wgUploadPath = "{$wgArticlePath}/../wiki_uploads";
Thanks again for your help Frank
Frank Ralf wrote:
I had a closer look at the generated HTML and found that both wiki links create the same HTML:
<img src="../wiki_uploads/5/51/My_picture.png" />
That relative path is wrong for a subpage as there's one path level missing. So I suppose the problem has something to do with my path settings.
I found the solution. I had to change the upload path so it includes the article path like so:
$wgUploadPath = "{$wgArticlePath}/../wiki_uploads";
Thanks again for your help Frank
Usually, it is set based on wgScriptPath: $wgUploadPath = "{$wgScriptPath}/wiki_uploads";
mediawiki-l@lists.wikimedia.org