Page MenuHomePhabricator

Interwiki transclusion does not show images
Open, LowPublicFeature

Description

Author: gunter.schmidt

Description:
I tried to include a page from another wiki with images. The page itself is displayed, but the
images are not. Clicking on the image will jump to the correct page of the original wiki and
display the image.

I tried to set
$wgUseSharedUploads = true;
$wgSharedUploadPath = "http:.../images";
but no luck either.

I think the table interwiki should have at least one more column:
iw_imageurl: path of the images for that interlinked wiki.

Maybe also:
iw_imagecommonsurl: path of the common image url, if used


Version: unspecified
Severity: enhancement

Details

Reference
bz9355

Related Objects

Event Timeline

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

gunter.schmidt wrote:

oh, actually there must be an info how $wgHashedUploadDirectory is set on the linked wiki.

robchur wrote:

Check the shared image repo. configuration is actually all there.

Basic image display worksforme. Might have some issues with style images at mentioned in bug 15512. Adding that as a blocker to this, although normal image use _seems_ to work.

bugs wrote:

I'm the reporter of bug 15512, and I confirm that this also happens with included image paths. This is not noticed in Wikimedia wikis because all image paths are fully-qualified, since they are served by a different server (upload.wikimedia.org). But default installations have $wgUploadPath = "$wgScriptPath/images", and $wgScriptPath itself is not fully-qualified.

Currently, I'm using this workaround:

  1. Work around bug in MediaWiki 1.13 when '?action=render'.
  2. https://bugzilla.wikimedia.org/show_bug.cgi?id=15512

global $wgRequest, $wgScriptPath, $wgUploadPath;
global $wgStylePath, $wgMathPath, $wgLocalFileRepo;
if ( $wgRequest->getVal( 'action' ) == 'render' ) {

		$wgScriptPath = wfExpandUrl( $wgScriptPath );
		$wgUploadPath = wfExpandUrl( $wgUploadPath );
		$wgStylePath  = wfExpandUrl( $wgStylePath  );
		$wgMathPath   = wfExpandUrl( $wgMathPath   );
		$wgLocalFileRepo['url'] = wfExpandUrl( $wgLocalFileRepo['url'] );

}

It fixes local images as well as style images and math formulas.

  • Bug 18624 has been marked as a duplicate of this bug. ***
Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:01 AM
Aklapper removed a subscriber: wikibugs-l-list.