Page MenuHomePhabricator

Flow: Navpopups doesn't function with Flow links
Open, MediumPublic

Description

Using the [[WP:Navpop]] gadget (as thousands of powerusers do) to mouseover a link to a Flow post or Flow diff, currently displays an empty preview.

Also, using Navpop on a Flow Board history link, currently displays the pre-Flow history, in the preview.

(Note: A few months ago, using it on a link would display this text, which is the same as LQT currently/always gave:
/* cache key: mediawikiwiki:resourceloader:filter:minify-css:7:7bd1359907426500f5c6b3d58173fbf3 */
but that is no longer the case.)


Version: unspecified
Severity: normal

Details

Reference
bz63713

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:08 AM
bzimport set Reference to bz63713.
bzimport added a subscriber: Unknown Object (MLST).

Webconsole shows an "Unsupported Media Type" error, when trying to launch a Navpopup for a Flow topic/post/diff.

Does this need to be fixed in Flow, or in Navpopups?

(Tracked in trello at https://trello.com/c/NHfDtXh6/ )

(In reply to Quiddity from comment #1)

Webconsole shows an "Unsupported Media Type" error, when trying to launch a
Navpopup for a Flow topic/post/diff.

Does this need to be fixed in Flow, or in Navpopups?

Neither. To fetch the contents to display, the gadget makes a request for the page with action=raw, e.g.:
https://www.mediawiki.org/w/index.php?title=Talk:Flow&action=raw&ctype=text/css&maxage=0&smaxage=0'

and this does indeed return an error:

The requested page uses the content model `flow-board` which is not supported via this interface.

which is true. Navpopups could look for this error and not put up its menu

RawAction.php gets the page content from the revision table with Revision:newFromTitle() which fails with this error. It won't going to work for Flow content unless we rewrite Revision::newFromTitle() with some hacky "If it's Flow content, what you actually want to do is get different info from a different system."

There's probably an API that can get page content regardless of its content model, it would make more sense for Flow to support that and Navpopups to use it instead. Some of the info that Navpopups displays makes sense for a Topic; but a Flow board, being a window into an unbounded set of topics, doesn't really have a last modified time or a size. ErikB or Daniel Kinzler would have better insight.

Note that Hovercards (the Popups extension) has a different approach: it issues an API query for extracts|pageimages|revisions|info, which also don't work for Flow content.

Restricted Application added a subscriber: Aklapper. · View Herald Transcript