Last modified: 2012-01-08 01:40:40 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 T27800, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25800 - wgAction should contain the actually performed action instead of whatever the query value contains
wgAction should contain the actually performed action instead of whatever the...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.17.x
All All
: Normal enhancement (vote)
: 1.19.0 release
Assigned To: Krinkle
:
: 26528 (view as bug list)
Depends on: 27930
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-05 15:51 UTC by Krinkle
Modified: 2012-01-08 01:40 UTC (History)
4 users (show)

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


Attachments

Description Krinkle 2010-11-05 15:51:02 UTC
Although the action parameter overrides the diff-parameter when it's present...

ie. [1] http://commons.wikimedia.org/w/index.php?title=File%3AMessi_Training_.jpg&action=submit&diff=45556202&oldid=45511597 and [2] http://commons.wikimedia.org/w/index.php?title=File%3AMessi_Training_.jpg&action=history&diff=45556202&oldid=45511597 don't show diff-views but editscreens and historypages respectively.

..  when it's not present the diff-parameter instructs MediaWiki to asume a historysubmit and generate a diff.
Such as on this link [3] http://commons.wikimedia.org/w/index.php?title=File%3AMessi_Training_.jpg&diff=45556202&oldid=45511597 or [4] http://commons.wikimedia.org/w/index.php?diff=45556202&oldid=45511597 or even [5] http://commons.wikimedia.org/?diff=45556202 for that matter, all show the diff-view. But also all of them have wgAction set to "view" which is wrong.

Although the last link variation is nowhere generated by MediaWiki itself, the first two varations ([3] and [4]) are actually generated by MediaWiki from IRC and in RecentChanges.

The main reason being that it will be a lot easier for user scripts, widgets and tools to detect diff-views as there are so many different URLs possibly leading to it, the easiest way is just for the wgAction to say what it is.
Comment 1 Krinkle 2011-01-01 02:05:33 UTC
*** Bug 26528 has been marked as a duplicate of this bug. ***
Comment 2 DieBuche 2011-07-11 10:54:25 UTC
r91870
Comment 3 Brion Vibber 2011-07-11 23:37:26 UTC
This seems pretty wrong... you *should* generally have 'view' as the action on a diff page, as it's a *page view* with some specialized additions (a particular version, some diffs at the top).

By default, old revision & diff views both show a full page rendering, and have some extra UI at top. Neither is expected to change the action away from 'view'.
Comment 4 Brion Vibber 2011-07-11 23:42:37 UTC
Reverted in r91927.
Comment 5 DieBuche 2011-07-11 23:49:43 UTC
http://en.wikipedia.org/w/index.php?title=Foobar&action=historysubmit&diff=437783052&oldid=437205393

and

http://en.wikipedia.org/w/index.php?title=Foobar&diff=437783052&oldid=437205393

both output *exactly* the same page.  Why is one action=view and the other action=historysubmit?

(In reply to comment #3)
> This seems pretty wrong... you *should* generally have 'view' as the action on
> a diff page, as it's a *page view* 
Then why's there an action historysubmit?
Comment 6 Brion Vibber 2011-07-11 23:57:27 UTC
action=historysubmit is for.... submitting the history form.

Note that there are at least two distinct things available in that form right now:
* diff selection (which really just points you off to a view)
* selection of revs for show/hide/revdel

I think both of these should redirect you to consistent GET & action=view URLs, for the page w/ diff view or Special:RevisionDelete respectively.
Comment 7 Brion Vibber 2011-07-11 23:58:00 UTC
(Note that the millions of direct diff links all over the site have *never* included action=historysubmit, and they shouldn't.)
Comment 8 DieBuche 2011-07-12 12:39:50 UTC
(In reply to comment #7)
> (Note that the millions of direct diff links all over the site have *never*
> included action=historysubmit, and they shouldn't.

That they included  action=historysubmit in the diff selection is actually a sideefffect of r57415
Comment 9 Krinkle 2012-01-08 00:44:36 UTC
Now that bug 27930 is resolved. We can fix this bug by using MediaWiki::getAction() instead of looking at the URL directly and doing all sorts of nasty things (e.g. action=yadadadad shouldn't result in "wgAction": "yadadadad".).

See also bug 33587.
Comment 10 Krinkle 2012-01-08 01:36:15 UTC
Done in r108343.

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


Navigation
Links