Last modified: 2014-09-23 23:18:10 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 T32066, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30066 - wgAction empty on Special:ComparePages
wgAction empty on Special:ComparePages
Status: NEW
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
1.20.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-26 08:28 UTC by Michael M.
Modified: 2014-09-23 23:18 UTC (History)
2 users (show)

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


Attachments
Patch against trunk (416 bytes, patch)
2011-12-02 22:00 UTC, MrBlueSky
Details

Description Michael M. 2011-07-26 08:28:34 UTC
When comparing two revisions on Special:ComparePages the JavaScript variable wgAction (or mw.config.get('wgAction')) is empty:

http://translatewiki.net/wiki/Special:ComparePages?page1=Translating%3ALanguages&rev1=&page2=Main_Page&rev2=&action=&diffonly=

The body class action-view is set correctly. When you are on Special:ComparePages without parameters, alert(wgAction) shows "view" as expected. I can reproduce this only on trunk, 1.17 shows "view" in any case.
Comment 1 MrBlueSky 2011-12-02 22:00:51 UTC
Created attachment 9601 [details]
Patch against trunk
Comment 2 Brion Vibber 2011-12-16 21:23:26 UTC
Hmmm, I think the right thing is to skip the action parameter entirely here, I'm not really sure why it's being explicitly added if it's empty or the default 'view'.

It seems that it's being thrown into the form as a way of getting at the global query string parameter in case someone manually sets ?action=purge.

There shouldn't be a *form* entry at all here in this case, since we don't want to add it to the resulting URL when submitting the form; it should check something from the context object, I think. Maybe just $context->getRequest()->getVal('action')? Or do we have a better way to get the global action?
Comment 3 MrBlueSky 2012-01-14 22:19:53 UTC
Things have changed: the default action is now 'nosuchaction' and all special pages seem to have it as $wgAction, including Special:ComparePages with parameters. So this bug itself seems fixed, altough the odd way of checking for a purge remains.

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


Navigation
Links