Page MenuHomePhabricator

Support video on wikitech wiki
Open, Needs TriagePublic

Description

At https://wikitech.wikimedia.org/w/index.php?title=User:Quiddity/Sandbox2&oldid=1768977 the content is

[[File:Docking GPCR example.webm|thumb|Docking GPCR example]]

but the thumbnail is not rendered as expected.

TimedMediaHandler is not enabled on wikitech

Event Timeline

Related, but maybe not root cause:

[072ca6f7ea0e4d7ec4234ae8] /w/index.php?title=File:Introduction_to_Wikimedia_Cloud_Services.webm&action=purge   ErrorException from line 343 of /srv/mediawiki/php-1.30.0-wmf.15/includes/filerepo/file/ForeignAPIFile.php: PHP Warning: Invalid argument supplied for foreach()
#0 /srv/mediawiki/php-1.30.0-wmf.15/includes/filerepo/file/ForeignAPIFile.php(343): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.30.0-wmf.15/includes/filerepo/file/ForeignAPIFile.php(371): ForeignAPIFile->getThumbnails()
#2 /srv/mediawiki/php-1.30.0-wmf.15/includes/filerepo/file/ForeignAPIFile.php(351): ForeignAPIFile->purgeThumbnails(array)
#3 /srv/mediawiki/php-1.30.0-wmf.15/includes/page/WikiFilePage.php(186): ForeignAPIFile->purgeCache(array)
#4 /srv/mediawiki/php-1.30.0-wmf.15/includes/page/Article.php(2129): WikiFilePage->doPurge()
#5 /srv/mediawiki/php-1.30.0-wmf.15/includes/actions/PurgeAction.php(45): Article->doPurge()
#6 /srv/mediawiki/php-1.30.0-wmf.15/includes/actions/PurgeAction.php(66): PurgeAction->onSubmit(array)
#7 /srv/mediawiki/php-1.30.0-wmf.15/includes/MediaWiki.php(499): PurgeAction->show()
#8 /srv/mediawiki/php-1.30.0-wmf.15/includes/MediaWiki.php(293): MediaWiki->performAction(ImagePage, Title)
#9 /srv/mediawiki/php-1.30.0-wmf.15/includes/MediaWiki.php(868): MediaWiki->performRequest()
#10 /srv/mediawiki/php-1.30.0-wmf.15/includes/MediaWiki.php(523): MediaWiki->main()
#11 /srv/mediawiki/php-1.30.0-wmf.15/index.php(43): MediaWiki->run()
#12 /srv/mediawiki/w/index.php(3): require(string)
#13 {main}

TimedMediaHandler isn't enabled on the wiki... I guess that might explain to some extent MW on wikitech not knowing how to handle it properly... With it being a remote file from commons

	/**
	 * @return array
	 */
	function getThumbnails() {
		$dir = $this->getThumbPath( $this->getName() );
		$iter = $this->repo->getBackend()->getFileList( [ 'dir' => $dir ] );

		$files = [];
		foreach ( $iter as $file ) {
			$files[] = $file;
		}

		return $files;
	}

From ForeignAPIFile.php

  • Very hacky and inefficient, do not use :D

TimedMediaHandler isn't enabled on the wiki...

Ha! Ok then.
I will change the thumbnail to a file link for now.
I guess this task should either be closed as invalid, or repurposed into something else? Leaving up to y'all.

Question for maybe @brion if we can just enable it, knowing it won't do any transcodes etc? Purely for the viewing/viewer capabilities?

Offhand I don't know of any reason it couldn't be turned on there.

Note if you enable TimedMediaHandler, *and* upload video files locally, they'll be transcoded through the job queue infrastructure -- and would require running on a machine with ffmpeg installed. But remote files from Commons will only be referenced for their existing transcodes.

It does sound like wikitech is configured differently from other wikis and is using remote API repo instead of the direct-database access to Commons? Should work fine with that, I use that on all my little test wikis as well as local uploads. :)

TheDJ renamed this task from Video thumbnails not working at wikitech to Support video on wikitech wiki.Nov 1 2023, 1:49 PM
TheDJ updated the task description. (Show Details)