Page MenuHomePhabricator

incompatible with ForeignDBRepo
Closed, ResolvedPublic

Description

originally reported at https://www.mediawiki.org/wiki/Thread:Extension_talk:TimedMediaHandler/Fatal_error:_Call_to_undefined_method_ForeignDBRepo::fetchImageQuery

Extension calls ForeignDBRepo::fetchImageQuery() since it seems to assume that anything that isn't local, or a ForeignDBViaLBRepo is an API repo, which is an incorrect assumption.


Version: unspecified
Severity: normal

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:59 AM
bzimport set Reference to bz61986.
Gilles triaged this task as Medium priority.Nov 24 2014, 2:51 PM
Gilles subscribed.

I should notice that videos are transcludable. Only MP3 files handled by MP4 handler aren't.

Does this relate to T71570 per chance ?

Almost certainly. :)

Maybe we should change that check to: is_a( repo, 'LocalFileRepo')

I moved from OggHandler to TimedMediaHandler while upgrading from 1.18 to 1.28 (hard work).
But I encounter that bug.
Our servers have a common wiki as a database with voice ogg files for all language specific wikis. It is similar to Commons and language specific wikipedias of Wikimedia.

I have a single LocalSettings php file, but I am not using $wgForeignFileRepos but the old way.

Does a stable version of TimedMediaHandler exist?

Regards,

Does a stable version of TimedMediaHandler exist?

Unfortunately very few people want to work on these kinds of things, which causes it to be very unstable. Any help is greatly appreciated.

https://www.mediawiki.org/wiki/Topic:Rpyj5hm5jnwdr1tt seems to suggest a solution, but I cannot understand... is there a work around?

Isn't this as simple as replacing all the instanceof ForeignDBViaLBRepo checks with instanceof ForeignDBRepo? I don't think there's any relevant difference.

TheDJ claimed this task.

This was fixed with the introduction of IForeignRepoWithMWApi by @Bawolff, I'm pretty sure. Please reopen if not the case.

Reopening; this is still an issue. While it no longer tries to call those methods on a ForeignDBRepo it also doesn't actually work, because the code is still hardcoded to check explicitly for ForeignDBViaLBRepo (and nothing else). This results in nothing appearing along with a PHP warning of "trying to access array offset of type bool" due to there being effectively 0 sources.

I think Tgr's comment from 2020 is probably accurate and I'll try that out myself to see if that works, and send a patch upstream if it does.

Change 871907 had a related patch set uploaded (by Skizzerz; author: Skizzerz):

[mediawiki/core@master] Create shared interface for foreign db repos

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

Change 871908 had a related patch set uploaded (by Skizzerz; author: Skizzerz):

[mediawiki/extensions/TimedMediaHandler@master] Use IForeignRepoWithDB instead of ForeignDBViaLBRepo

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

Change 871907 merged by jenkins-bot:

[mediawiki/core@master] Create shared interface for foreign db repos

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

Change 871908 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@master] Use IForeignRepoWithDB instead of ForeignDBViaLBRepo

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

TheDJ reassigned this task from TheDJ to Skizzerz.