Last modified: 2014-09-26 00:17:41 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 T40450, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38450 - Reimplement MediaWiki's info action (tracking)
Reimplement MediaWiki's info action (tracking)
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
https://www.mediawiki.org/wiki/Reques...
: design, tracking
Depends on: 39533 41006 41326 41327 41329 41366 41367 42238 42864 42867 16362 38451 38526 38527 38528 38529 38530 38531 38532 38533 38534 38536 38537 38556 38558 38559 38560 38561 38562 38563 38564 39490 39491 39688 39951 39953 39954 39955 39956 39957 39981 40046 40154 40248 40257 40829 40845 41365 41368 41369 41470 41582
Blocks: tracking
  Show dependency treegraph
 
Reported: 2012-07-17 20:23 UTC by MZMcBride
Modified: 2014-09-26 00:17 UTC (History)
8 users (show)

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


Attachments

Description MZMcBride 2012-07-17 20:23:26 UTC
This is a tracking bug for the following RFC: <https://www.mediawiki.org/wiki/Requests_for_comment/Reimplement_info_action>.
Comment 1 Bawolff (Brian Wolff) 2012-07-20 19:50:47 UTC
I wonder if just including everything in the page prop table for that page would be useful. OTOH there's no garuntee the values of the page prop table are human readable (or pretty).
Comment 3 Madman 2012-08-04 03:55:58 UTC
Mockup has been implemented here: https://gerrit.wikimedia.org/r/#/c/17634/. Currently addresses: bug 38526, bug 38527, bug 38528, bug 38530, bug 38531, bug 38532, bug 38533, bug 38536, bug 38558, bug 38560, bug 38561, bug 38562, bug 38563, bug 38564.
Comment 4 Madman 2012-08-04 21:42:23 UTC
Now addresses: bug 38529 (hidden categories). Not sure how to address bug 16362; not sure where to put link to info action (though I think MZMcBride's suggestion of the toolbox is a good one).
Comment 5 Richard Guk 2012-09-03 21:06:34 UTC
As now implemented on the http://www.mediawiki.org/ wiki, this has the following minor issues when handling invalid parameters:

- an invalid "oldid" value causes info for the main page to be displayed instead of generating an error page
e.g. http://www.mediawiki.org/w/index.php?oldid=999999999&action=info
(but an invalid "curid" value correctly shows "Bad title" error)

- an invalid "title" value shows invalid data (garbage in edit history info) instead of generating an error page
e.g. http://www.mediawiki.org/w/index.php?title=invalidtitlehere&action=info
Comment 6 MZMcBride 2012-09-03 21:09:52 UTC
(In reply to comment #5)
> As now implemented on the http://www.mediawiki.org/ wiki, this has the
> following minor issues when handling invalid parameters:

These should be filed as separate bugs, please. :-)

> - an invalid "oldid" value causes info for the main page to be displayed
> instead of generating an error page
> e.g. http://www.mediawiki.org/w/index.php?oldid=999999999&action=info
> (but an invalid "curid" value correctly shows "Bad title" error)

Right. But does a "valid" oldid behave as you expect? I think you're hitting a differently (underlying) issue (i.e., that ?action=info doesn't support oldid's).

> - an invalid "title" value shows invalid data (garbage in edit history info)
> instead of generating an error page
> e.g. http://www.mediawiki.org/w/index.php?title=invalidtitlehere&action=info

"Invalidtitlehere" isn't an invalid title. :-)  https://www.mediawiki.org/w/index.php?title=invalidtitlehere%3C&action=info (with a "<" appended to the example page title, making the title actually invalid) throws a "bad title" error, as expected.
Comment 7 Richard Guk 2012-09-03 22:23:41 UTC
(In reply to comment #6)
> These should be filed as separate bugs, please. :-)

Sorry to be feeble, but with the myriad of related bugs and your greater knowledge of whether my report amounts to zero, one or two bugs, I'd be grateful if you could file whatever consequential bug reports are appropriate.

> Right. But does a "valid" oldid behave as you expect?

Yes, if the "oldid" value refers to a (past or current) revision ID that exists.

The problem is that any other "oldid" value (in the absence of any "title") returns info about the main page instead of returning an error, so readers may not realise that they have made a mistake.

Note: I have not tested the handling of revdeleted IDs.

> I think you're hitting a
> differently (underlying) issue (i.e., that ?action=info doesn't support
> oldid's).

Whether accidentally or by design, "oldid" values are correctly mapped to the current revision of the relevant page when oldid matches a revisionid, as expected.

But, unlike the robust "curid" handling, "oldid" fails to degrade gracefully by returning an error message (instead of data for the main page) if there is no matching revision ID.

> "Invalidtitlehere" isn't an invalid title. :-) 

Elephant! Rephrasing:

If the "title" parameter (or the canonical /wiki/Baz:Foo_bar URL) does not refer to a page that exists, action=info should return an error page, instead of the misleading garbage edit history data that it currently returns.

From a non-coder's perspective, even if you consider the above parameters to be unsupported and unworthy of attention, the inconsistent failure responses hint that poor internal validation may lead to unexpected results or unintended information disclosure in more complex scenarios.

Or, to put it more positively: strong validation checks would save confusion when the functionality is rolled out more widely.
Comment 8 Madman 2012-09-04 05:32:51 UTC
I think all of the above could really fall under bug 39688 (action=info's behavior on a nonexistent page).
Comment 9 MZMcBride 2012-09-04 05:36:13 UTC
(In reply to comment #7)
> (In reply to comment #6)
>> Right. But does a "valid" oldid behave as you expect?
> 
> Yes, if the "oldid" value refers to a (past or current) revision ID that
> exists.
> 
> The problem is that any other "oldid" value (in the absence of any "title")
> returns info about the main page instead of returning an error, so readers may
> not realise that they have made a mistake.

Hmmm. I see what you mean now. https://www.mediawiki.org/w/index.php?title=&oldid=1111111111111111111&action=view throws an error, so https://www.mediawiki.org/w/index.php?title=&oldid=1111111111111111111&action=info should presumably as well. This should be filed as a separate bug.

> Whether accidentally or by design, "oldid" values are correctly mapped to the
> current revision of the relevant page when oldid matches a revisionid, as
> expected.

You think that's the correct behavior?

> If the "title" parameter (or the canonical /wiki/Baz:Foo_bar URL) does not
> refer to a page that exists, action=info should return an error page, instead
> of the misleading garbage edit history data that it currently returns.

This is bug 39688 ("action=info displays misleading edit history for redlinks").
Comment 10 Richard Guk 2012-09-04 09:23:30 UTC
(In reply to comment #9)
> (In reply to comment #7)
> > Whether accidentally or by design, "oldid" values are correctly mapped to the
> > current revision of the relevant page when oldid matches a revisionid, as
> > expected.
> You think that's the correct behavior?

On balance, yes. In the absence of functionality for returning info about superseded revisions, it is a reasonable fallback - *some* of the returned info relates to the page ID so is relevant and accurate regardless of whether the revision is current.

But it would be even better if the revision-specific info were accurate or blanked instead of defaulting to the info for a later revision.

And it certainly should not default to returning info about the main page if the revision does not exist.

(Recent wider discussion of merits of returning info about non-current revisions:
[[mw:Talk:Requests_for_comment/Reimplement_info_action]]#Applicability_to_old_revisions )

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


Navigation
Links