Page MenuHomePhabricator

Reimplement MediaWiki's info action (tracking)
Open, NormalPublic

Description

Details

Reference
bz38450

Related Objects

StatusAssignedTask
OpenNone
ResolvedNone
ResolvedNone
OpenNone
OpenNone
OpenNone
ResolvedReedy
ResolvedNone
OpenNone
OpenNone
OpenNone
DuplicateNone
OpenNone
ResolvedDereckson
OpenNone
ResolvedTgr
DuplicateNone
DuplicateNone
ResolvedMilimetric
ResolvedMilimetric
ResolvedOttomata
Resolvedmobrovac
ResolvedTgr
Resolved dpatrick
ResolvedLegoktm
ResolvedTgr
ResolvedReedy
ResolvedPeachey88
ResolvedTgr
OpenNone
OpenNone
ResolvedJdforrester-WMF
ResolvedNone
OpenNone
ResolvedParent5446
OpenNone
ResolvedNone
ResolvedParent5446
ResolvedUmherirrender
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolvedcsteipp
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedKrenair
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedKrenair
ResolvedNone
Resolvedhoo
OpenNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedParent5446

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz38450.
bzimport added a subscriber: Unknown Object (MLST).

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).

madman.enwiki wrote:

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.

madman.enwiki wrote:

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).

richardg_uk wrote:

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

(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. :-)

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).

"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.

richardg_uk wrote:

(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.

madman.enwiki wrote:

I think all of the above could really fall under bug 39688 (action=info's behavior on a nonexistent page).

(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").

richardg_uk wrote:

(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 )