Page MenuHomePhabricator

Rendering of descriptions for shared images causes inappropriate image URLs for shared images
Closed, ResolvedPublic

Description

Author: jean.luc.henry

Description:
Hello,

Trying to setup an upload server http://base.ekopedia.org like "Commons" project
for wikipedia.
Everything work great except one thing: images included in image description
fetched by wgFetchCommonsDescriptions do not use correct URL source.

As you can see on this URL:
http://base.ekopedia.org/Image:Pecheurs-sur-la-plage.jpg, the image and
description is fetched correctly. But there is an banner (Public Domain) which
contain an image inside.
As you can see on the source page:
http://base.ekopedia.org/Image:Pecheurs-sur-la-plage.jpg, the image in the
banner is ok.

So $wgFetchCommonsDescriptions works correctly for text, but did not correct the
image URL. In fact in html, this is this URL:
http://fr.ekopedia.org/images/thumb/6/62/PD-icon.svg/64px-PD-icon.svg.png
Instead of this one:
http://base.ekopedia.org/images/thumb/6/62/PD-icon.svg/64px-PD-icon.svg.png

I'm using this configuration:
$wgUseSharedUploads = true;
$wgSharedUploadPath = "http://base.ekopedia.org/images";
$wgSharedUploadDirectory = "/var/www/base.ekopedia.org/images";
$wgHashedSharedUploadDirectory = true;
$wgSharedUploadDBname = "base";
$wgFetchCommonsDescriptions = true;
$wgRepositoryBaseUrl = "http://base.ekopedia.org/image:";
$wgCacheSharedUploads = true;
$wgSharedLatin1 = false;

Jean-Luc


Version: unspecified
Severity: normal
URL: http://base.ekopedia.org/Image:Pecheurs-sur-la-plage.jpg

Details

Reference
bz9087

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:38 PM
bzimport set Reference to bz9087.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

As far as I can tell, this is because MediaWiki on the "calling" wiki asks the
"pool" wiki (where the shared image resides) to render the description when it
retrieves it. As far as the pool wiki is concerned, a shared image in the
description text is local to it, so it outputs an URL that is foreign to the caller.

jean.luc.henry wrote:

There was a typo! :(

For this:

As you can see on this URL:
http://base.ekopedia.org/Image:Pecheurs-sur-la-plage.jpg, the image and
description is fetched correctly. But there is an banner (Public Domain) which

You should read:
http://fr.ekopedia.org/Image:Pecheurs-sur-la-plage.jpg

Jean-Luc

As a workaround, try setting the full URL in $wgUploadPath on the shared wiki.
(eg including hostname)

jean.luc.henry wrote:

Hi,

I've put this on the shared wiki:
$wgUploadPath = "http://base.ekopedia.org/images";

and this is working fine.

Thanks a lot!
Jluc

  • Bug 9184 has been marked as a duplicate of this bug. ***

Bryan.TongMinh wrote:

Code inspection indicates that this should be fixed somewhere along the way. Please reopen if the bug still occurs.