Last modified: 2014-02-12 23:55:02 UTC
Most recent MediaWiki version (did a 'git clone' in the extensions dir). I am running MW 10.20.2. After doing the 'git clone' in my extensions directory, I added the line require_once("$IP/extensions/MobileFrontend/MobileFrontend.php"); right before the closing ?> in LocalSettings.php. When I load up the wiki and click on the 'mobile version' link at the bottom, I get this error (I've changed my domain name and username): Fatal error: Call to undefined method DeviceProperties::moduleName() in /home/username/mydomain.com/wiki/extensions/MobileFrontend/includes/skins/SkinMobile.php on line 317 I did a 'find' command from the prompt to see where the DeviceProperties class lives. I'm not sure if this is helpful, but here is the output anyway: $ find . -exec grep DeviceProperties {} \; -print interface IDeviceProperties { * @return IDeviceProperties function detectDeviceProperties( $userAgent, $acceptHeader = '' ); * @return IDeviceProperties function getDeviceProperties( $deviceName, $userAgent ); * MediaWiki's default IDeviceProperties implementation final class DeviceProperties implements IDeviceProperties { * @return IDeviceProperties public function detectDeviceProperties( $userAgent, $acceptHeader = '' ) { return $this->getDeviceProperties( $deviceName, $userAgent ); * @return IDeviceProperties public function getDeviceProperties( $deviceName, $userAgent ) { return new DeviceProperties( self::$formats[$deviceName], $userAgent ); return new DeviceProperties( array( ./extensions/MobileFrontend/includes/DeviceDetection.php /** @var IDeviceProperties */ * @return IDeviceProperties $this->device = $detector->getDeviceProperties( $formatName, $userAgent ); $this->device = $detector->detectDeviceProperties( $userAgent, $acceptHeader ); ./extensions/MobileFrontend/includes/MobileContext.php protected function attachResources( Title $title, QuickTemplate $tpl, IDeviceProperties $device ) { ./extensions/MobileFrontend/includes/skins/SkinMobile.php $device = $detector->getDeviceProperties( $format, '' ); $device = $detector->getDeviceProperties( $format, '' ); $device = $detector->detectDeviceProperties( $userAgent ); ./extensions/MobileFrontend/tests/DeviceDetectionTest.php $device = $detector->getDeviceProperties( 'webkit', '' ); ./extensions/MobileFrontend/tests/SkinMobileTest.php 'DeviceProperties' => 'includes/mobile/DeviceDetection.php', 'IDeviceProperties' => 'includes/mobile/DeviceDetection.php', ./includes/AutoLoader.php interface IDeviceProperties { * @return IDeviceProperties function detectDeviceProperties( $userAgent, $acceptHeader = '' ); * @return IDeviceProperties function getDeviceProperties( $deviceName ); * MediaWiki's default IDeviceProperties implementation final class DeviceProperties implements IDeviceProperties { * @deprecated: Deprecated, will be removed once detectDeviceProperties() will be deployed everywhere on WMF * @return IDeviceProperties public function detectDeviceProperties( $userAgent, $acceptHeader = '' ) { return $this->getDeviceProperties( $deviceName ); * @deprecated: Deprecated, will be removed once detectDeviceProperties() will be deployed everywhere on WMF * @return IDeviceProperties public function getDeviceProperties( $deviceName ) { return new DeviceProperties( self::$formats[$deviceName] ); return new DeviceProperties( array( ./includes/mobile/DeviceDetection.php Here's the version information from Special:Version: Product Version MediaWiki 1.20.2 PHP 5.3.13 (cgi-fcgi) MySQL 5.1.56-log
Sounds like bug 44068 - will need to check when DeviceDetection got removed from core - but MediaWiki shouldn't provide an implementation of IDeviceProperties. It's possible this is fixed in the latest development version but hasn't made it into a MediaWiki release yet...
Unfortunately, latest MobileFrontend doesn't work with anything but MediaWiki master, so even if we fix this particular issue by removing a line from AutoLoader.php, MobileFrontend will still not work for you as it requires mobile support in ResourceLoader. The only option here is to either upgrade MediaWiki to a git cheeckout (sounds scary), or stick with MobileFrontend REL1_20 branch which is known to work with MW 1.20.
REL1_20 branch works with MW 1.20.3 but mobile device autodetection doesn't seem to work. Is there a way to make REL1_20 use some kind of mobile autodetection?
Sorry, but in addition to DeviceDetection changes, master MobileFrontend requires a bunch more of core changes only present in 1.21alpha, so there's no chance of backporting or backwards-compatible MF release.