Page MenuHomePhabricator

QuickInstantCommons is incompatible with TimedMediaHandler, MediaWiki 1.37 or earlier
Closed, DeclinedPublicBUG REPORT

Description

After doing some digging I found the cause of the incompatibilities:

It's seems to be caused by https://github.com/wikimedia/mediawiki-extensions-TimedMediaHandler/blob/b7204aca2fe4b00112f0925951dcf386af136b83/includes/WebVideoTranscode/WebVideoTranscode.php#L575 in MediaWiki 1.37, which is https://github.com/wikimedia/mediawiki-extensions-TimedMediaHandler/blob/b7e29cd22e59e9f96329dcd562f78b3c8a507533/includes/WebVideoTranscode/WebVideoTranscode.php#L575 in MediaWiki 1.38+. Because of the way QuickInstantCommons does it, it uses https://github.com/wikimedia/mediawiki-extensions-QuickInstantCommons/blob/f7c141b9bda98dd4d11190f402362c60594a47af/src/Repo.php#L57 (IForeignRepoWithMWApi) even on <1.38, using a stub interface. This results in TimedMediaHandler expecting ForeignAPIFile to load the source, but even in <1.38 gets IForeignRepoWithMWApi, which results in TimedMediaHandler finding no sources, returning an empty array, resulting in the error at https://github.com/wikimedia/mediawiki-extensions-TimedMediaHandler/blob/da0355a0e3d581ad717460e912b88910ee24d074/includes/TimedMediaTransformOutput.php#L361 because the getMediaSources() function returns no found sources with ForeignAPIFile Because QuickInstantCommons uses IForeignRepoWithMWApi as a stub, for forward and backward compatibility simultaneously. But that's not what TimedMediaHandler is expecting.

Downstream task: https://phabricator.miraheze.org/T8984

Event Timeline

Restricted Application added subscribers: RhinosF1, Reception123, Aklapper. · View Herald Transcript

This is expected behaviour on 1.37 - You need 1.38 for the extension to work with TimedMediaHandler. There's not really much i can do for earlier versions.

If you want, you could manually apply the rejected patch to TMH, which would probably work with 1.37 https://gerrit.wikimedia.org/r/c/mediawiki/extensions/TimedMediaHandler/+/756875

As a last resort, in the repo options, you can add TimedMediaHandler to 'disabledMediaHandlers' option, which might have a fallback behaviour that's slightly nicer (but not really a fix).