Last modified: 2010-05-15 15:48:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 9411 - fetching commons image description pages broken if commons does not have short URLs
fetching commons image description pages broken if commons does not have shor...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.9.x
PC All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-24 20:27 UTC by Rupert Millard
Modified: 2010-05-15 15:48 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Fixes described issue. (325 bytes, patch)
2007-03-24 20:35 UTC, Rupert Millard
Details

Description Rupert Millard 2007-03-24 20:27:26 UTC
If $wgRepositoryBaseUrl contains a '?' then when the description of Example.jpg
is fetched, the page requested contains two '?'s:

http://commons.examplewiki.org/index.php?title=Image:Example.jpg?action=render

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:

363c363,369
< 			$text = Http::get($url . '?action=render');
---
>         		if(strrpos($url,'?')===false)
>                 		$delimiter = '?';
>         		else
>                 		$delimiter = '&';
>                 		
>                 	$text = Http::get($url . $delimiter. 'action=render');
>                 	

I hope this is helpful!
Comment 1 Rupert Millard 2007-03-24 20:35:46 UTC
Created attachment 3390 [details]
Fixes described issue.

The indentation was affected when I pasted this into the description field.
Comment 2 Brion Vibber 2007-03-26 14:33:45 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links