Page MenuHomePhabricator

viewing diff of redirect without specifying oldid makes wgPagename wrong
Closed, ResolvedPublic

Description

Author: cbm.wikipedia

Description:
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.


Version: unspecified
Severity: minor

Details

Reference
bz22496

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:58 PM
bzimport set Reference to bz22496.
bzimport added a subscriber: Unknown Object (MLST).
  • Bug 17159 has been marked as a duplicate of this bug. ***