Page MenuHomePhabricator

Flow: Extension:MultimediaViewer doesn't work on files in Flow posts
Open, HighPublic

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

Details

Reference
bz60014

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).
Quiddity created this task.Jan 13 2014, 9:43 PM

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.

Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptApr 3 2015, 5:40 PM

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

DannyH removed a subscriber: DannyH.Jul 12 2016, 11:25 PM
Tgr added a comment.Jul 18 2016, 11:05 PM

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?

Restricted Application added a project: Growth-Team. · View Herald TranscriptJul 18 2018, 6:45 PM
SBisson moved this task from Inbox to Triaged but Future on the Growth-Team board.Jul 20 2018, 6:06 PM

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