Page MenuHomePhabricator

fetching commons image description pages broken if commons does not have short URLs
Closed, ResolvedPublic


Author: rupert

If $wgRepositoryBaseUrl contains a '?' then when the description of Example.jpg
is fetched, the page requested contains two '?'s:

This causes the page for "Image:Example.jpg?action=render" to be displayed so
there are two logos, toolboxes and so on, and the description includes "No file
by this name exists, you can upload it."

I've written a small patch for ImagePage.php that fixes this:


< $text = Http::get($url . '?action=render');

        		$delimiter = '?';
        		$delimiter = '&';
        	$text = Http::get($url . $delimiter. 'action=render');

I hope this is helpful!

Version: 1.9.x
Severity: minor
Platform: PC



Event Timeline

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

rupert wrote:

Fixes described issue.

The indentation was affected when I pasted this into the description field.


brion added a comment.Mar 26 2007, 2:33 PM

Fixed in r20696.

Since the same type of check is used in a place in Title.php, I extracted it to
a common
function wfAppendQuery() and use it in both places.

Gilles moved this task from Untriaged to Done on the Multimedia board.