[Mediawiki-l] Upgraded but broke an extension
yecheondigital at yahoo.com
Mon Apr 9 17:26:22 UTC 2012
Thank you for replying. I changed the line
$img = function_exists( 'wfFindFile' ) ? wfFindFile( $title ) : new Image( $title );
and now when I hit the audio player it says "File not found." Unfortunately I don't know php and haven't been able to figure it out myself.
From: Platonides <Platonides at gmail.com>
To: mediawiki-l at lists.wikimedia.org
Sent: Monday, April 9, 2012 10:14 PM
Subject: Re: [Mediawiki-l] Upgraded but broke an extension
On 09/04/12 10:54, Chris Lewis wrote:
> I finally upgraded to Mediawiki 1.18 and while doing so it broke an mp3 player extension I was using (Flashmp3:http://www.mediawiki.org/wiki/Extension:FlashMP3 ). It looks like the person is no longer updating the extension as I saw a similar problem posted on the discussion section of the site.
> Since no one updating it anymore and the fact my wiki contains a lot of audio and it's crucial I get this working, I was hoping someone here might be able to help me.
> The error is :
> "Fatal error: Class 'Image' not found".
> for this piece of code: $img=function_exists('wfFindFile')? wfFindFile($title):newImage($title);
> Anyone know what in the latest mediawiki would make this code return a fatal error?
> Any help would be greatly appreciated.
> Thank you,
The image class was removed in 9c03e7f7baf7515e459594e7fe02040fe358df25
It had been only provided for code earlier than MediaWiki 1.11
It's really strange that you're hitting that error, since wfFindFile has
existed since MediaWiki 1.7 (ed4303922f4e850418168595c2a22cdd895081cc)
and the new Image path should never be executed.
I tested with both PHP 5.2 and 5.3 and they don't require an Image class
at all in that case.
Anyway, just changing that line to $img= wfFindFile($title); should fix it.
MediaWiki-l mailing list
MediaWiki-l at lists.wikimedia.org
More information about the MediaWiki-l