Page MenuHomeMiraheze

Wikimedia Commons media files "Error missing media source"
Closed, InvalidPublic

Description

Hello!

After the migration to the new host, a user has reported that linking Wikimedia Commons media files no longer work and they simply show "Error missing media source." Images work fine -- it is only the media files.

Example wiki https://tep.wiki/wiki/Tretrid and this is the file attempting to be used https://commons.wikimedia.org/wiki/File:Az%C9%99rbaycan_mar%C5%9F%C4%B1_instrumental.ogg

Related Objects

Event Timeline

Emz triaged this task as Normal priority.Mar 24 2022, 01:00
Emz created this task.

Yes, it still displays the same error message

What exactly are the steps you are taking? Are you trying to add it with VisualEditor? with the source editor?

Source editor when I was looking at it. I’ll ask that user if they tried the visual editor and if not one of us will attempt. I’ll update this message after we try it that way too.

Update:

Originally it was done with source and worked pre-migration. It became and error message post-migration.

Just seen the comment below after updated.

Unknown Object (User) added a comment.EditedApr 8 2022, 16:44

I traced the cause. It will be fixed in MediaWiki 1.38. It's 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.37, using a stub interface. This results in TimedMediaHandler expecting ForeignAPIFile to load the source, but even in 1.37 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 1.38 compatibility, and backward 1.37 compatibility simultaneously. But that's not what TimedMediaHandler is expecting. We could probably open an upstream task for this to fix in QuickInstantCommons if we want to.

Unknown Object (User) closed this task as Invalid.Apr 11 2022, 11:47
Unknown Object (User) claimed this task.
Unknown Object (User) edited projects, added Upstream, Extensions; removed MediaWiki.
Unknown Object (User) moved this task from Backlog to Deployed Extension Bugs on the Extensions board.
Unknown Object (User) moved this task from Backlog to Short Term on the MediaWiki (SRE) board.

https://phabricator.wikimedia.org/T305837

Closing as invalid since nothing further can be done from our end at this time.

Unknown Object (User) added a subscriber: Jakeukalane.