Last modified: 2011-03-12 15:34:46 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 T24496, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22496 - viewing diff of redirect without specifying oldid makes wgPagename wrong
viewing diff of redirect without specifying oldid makes wgPagename wrong
Status: CLOSED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 17159 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-12 12:44 UTC by CBM
Modified: 2011-03-12 15:34 UTC (History)
3 users (show)

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


Attachments

Description CBM 2010-02-12 12:44:45 UTC
When this diff link is loaded:

  http://en.wikipedia.org/w/index.php?title=Alien%20Quadrilogy&diff=343495013

the wgPagename variable (easily visible in the source) says

  wgPageName="Alien_(franchise)",

That's the name of the target page, not the redirect page which is being viewed.

Simultaneously, this bug makes all the navigation links at the top of the page wrong. For example, the link in the "article" tab points to:

  http://en.wikipedia.org/wiki/Alien_(franchise)

I noticed this in the Vector skin and checked that it also happens with the monobook skin. 

It seems to happen on every redirect if the specific syntax above is used to generate the diff. If another syntax is used:

http://en.wikipedia.org/w/index.php?title=Alien_Quadrilogy&diff=343495013&oldid=343382400

then everything works correctly. 

The syntax of the link at the top should be correct, according to http://www.mediawiki.org/wiki/Index.php . One reason that links like the ones at the top are needed is because the API output for watchlists only includes the revid, not the oldid. 

http://en.wikipedia.org/w/api.php?action=query&list=watchlist&wlallrev&wlprop=ids|title|timestamp|user|comment

Adding 'redirect=no' to the URL does fix the problem, but according to the docs, redirect=no "has effect only on action=view and action=render and only if neither oldid nor diff is given," but I am passing the diff parameter in the URL.
Comment 1 Alexandre Emsenhuber [IAlex] 2010-04-04 08:55:34 UTC
Fixed in r64592.
Comment 2 Alexandre Emsenhuber [IAlex] 2010-05-29 18:19:47 UTC
*** Bug 17159 has been marked as a duplicate of this bug. ***

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


Navigation
Links