Page MenuHomePhabricator

Flow: Extension:MultimediaViewer doesn't work on files in Flow posts
Closed, ResolvedPublic

Description

eg. https://www.mediawiki.org/w/index.php?title=Talk:Sandbox&workflow=050de81ad9c16f3747a890b11c28d448#flow-post-050e363501180b35e457842b2b77d79c
Clicking the image should open the Lightbox viewer (I have the BetaFeature enabled), but it currently just opens the [[mw:File:Test2.jpg]] page per the old/usual behaviour.


Version: unspecified
Severity: normal

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:51 AM
bzimport set Reference to bz60014.
bzimport added a subscriber: Unknown Object (MLST).

bingle-admin wrote:

The WMF core features team tracks this bug on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/flow/cards/718, but people from the community are welcome to contribute here and in Gerrit.

Eh, low-priority. Beta means Beta ;p.

Bumping importance, as Multimediaviewer is now a default feature on Mediawikiwiki, and will be on Enwiki as of May 22.

Change 298137 had a related patch set uploaded (by Esanders):
Fix selectors to match Parsoid DOM-spec images

https://gerrit.wikimedia.org/r/298137

matmarex added subscribers: Esanders, matmarex.

As I understand, that is a partial fix:

The remaining problem for Flow is that it doesn't populate mImageTimeKeys so MMV thinks there are no images on the page.

Change 298137 merged by jenkins-bot:
Fix selectors to match Parsoid DOM-spec images

https://gerrit.wikimedia.org/r/298137

From T64594#673955:

  • MultimediaViewerHooks::getModulesForArticle() - this checks if the image has any articles at all. It uses $out->getFileSearchOptions(), dunno if that works with Flow. If not, you need to add another exception like the one we have for file pages.
  • processThumb() in mmv.bootstrap.js - this is the that selects the actual images from the DOM.
  • MultimediaViewerHooks::thumbnailBeforeProduceHTML() adds size information to images and createNewImage() in mmv.js reads it back. Images without size information will still work, but having that information there makes the viewer more performant.
In T62014#2473478, @Tgr wrote:

From T64594#673955:

  • MultimediaViewerHooks::getModulesForArticle() - this checks if the image has any articles at all. It uses $out->getFileSearchOptions(), dunno if that works with Flow. If not, you need to add another exception like the one we have for file pages.

Except Flow isn't a core feature, so we'd have to add an exception from one extension to another, which is a bit ugly. Can getFileSearchOptions be fixed in Flow?

Change 495674 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/MultimediaViewer@master] Always load MMV on Flow pages

https://gerrit.wikimedia.org/r/495674

Change 495698 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/Flow@master] Fire wikipage.content hook after content update

https://gerrit.wikimedia.org/r/495698

Change 495674 merged by jenkins-bot:
[mediawiki/extensions/MultimediaViewer@master] Always load MMV on Flow pages

https://gerrit.wikimedia.org/r/495674

Change 495698 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] Fire wikipage.content hook after content update

https://gerrit.wikimedia.org/r/495698

Looks like those patches fixed the bug a year ago.