https://bugzilla.wikimedia.org/show_bug.cgi?id=22496

           Summary: viewing diff of redirect without specifying oldid
                    makes wgPagename wrong
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: Normal
         Component: General/Unknown
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: c...@tools.wikimedia.de


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.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are watching all bug changes.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to