Last modified: 2011-08-13 18:22:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T28036, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26036 - Inconsistent behavior of redirects on existing images in pages versus API
Inconsistent behavior of redirects on existing images in pages versus API
Status: NEW
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.17.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-21 06:55 UTC by Brad Jorsch
Modified: 2011-08-13 18:22 UTC (History)
6 users (show)

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


Attachments

Description Brad Jorsch 2010-11-21 06:55:19 UTC
If an image is uploaded and the description page is edited to be a redirect, MediaWiki generally seems to ignore the redirect and use the existing image. However, prop=imageinfo treats it as if it is a redirect with no image present at the title.

To reproduce:
1. Upload an image, e.g. File:Test.png
2. Edit the description page to make it a redirect to another image.
3. Use an image link to [[File:Test.png]] in the page. Note that it displays the image at File:Test.png, not whatever the redirect points to.
4. Use the API's prop=imageinfo with titles=File:Test.png. Note that it displays no imagerepository="" instead of imagerepository="local", and gives no other information about the image.

I personally don't care whether the API is changed to match the in-page behavior, or the in-page behavior is changed to match the API. But one or the other needs fixing.
Comment 1 Brad Jorsch 2010-11-21 20:31:15 UTC
I see that the general action=query&redirects=1 option also follows image redirects unconditionally, rather than only when no file actually exists for the name as the normal interface does.

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


Navigation
Links