Page MenuHomePhabricator

"PHP Notice: Undefined index: host" in PHP www-error.log using MobileFrontend
Closed, ResolvedPublic

Description

I'm trying to get the MobileFrontend extension to work in http://espiral.org/wiki/Especial:version (right now disabled since automatic mobile detection doesn't seem to work and it's slow)

The PHP www-error.log registers this problem every time a page is loaded:

[18-Apr-2012 05:14:13 UTC] PHP Notice: Undefined index: host in /.../w/extensions/MobileFrontend/MobileFrontend.php on line 624
[18-Apr-2012 05:14:13 UTC] PHP Stack trace:
[18-Apr-2012 05:14:13 UTC] PHP 1. {main}() /.../w/index.php:0
[18-Apr-2012 05:14:13 UTC] PHP 2. MediaWiki->run() /.../w/index.php:57
[18-Apr-2012 05:14:13 UTC] PHP 3. MediaWiki->main() /.../w/includes/Wiki.php:547
[18-Apr-2012 05:14:13 UTC] PHP 4. MediaWiki->finalCleanup() /.../w/includes/Wiki.php:641
[18-Apr-2012 05:14:13 UTC] PHP 5. OutputPage->output() /.../w/includes/Wiki.php:396
[18-Apr-2012 05:14:13 UTC] PHP 6. wfRunHooks() /.../w/includes/OutputPage.php:1861
[18-Apr-2012 05:14:13 UTC] PHP 7. Hooks::run() /.../w/includes/GlobalFunctions.php:3631
[18-Apr-2012 05:14:13 UTC] PHP 8. call_user_func_array() /.../w/includes/Hooks.php:216
[18-Apr-2012 05:14:13 UTC] PHP 9. ExtMobileFrontend->beforePageDisplayHTML() /.../w/includes/Hooks.php:216
[18-Apr-2012 05:14:13 UTC] PHP 10. ExtMobileFrontend->getMsg() /.../w/extensions/MobileFrontend/MobileFrontend.php:547
[18-Apr-2012 05:14:13 UTC] PHP 11. ExtMobileFrontend->getRelativeURL() /.../w/extensions/MobileFrontend/MobileFrontend.php:342

Am I missing anything in the configuration or is this a legitimate bug?

Mobile pages do load when forcing manually the mobile view.


Version: unspecified
Severity: normal

Details

Reference
bz36057
TitleReferenceAuthorSource BranchDest Branch
Consumer: reduce HTTP metricsrepos/search-platform/cirrus-streaming-updater!178pfischerreduce-metricsmain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:20 AM
bzimport set Reference to bz36057.
bzimport added a subscriber: Unknown Object (MLST).

You seem to be using an old version of MobileFrontend

In GIT HEAD there are only 217 lines in MobileFrontend.php

Can you try grabbing a new copy from Git and see how that works for you?

Thank you for the prompt answer!

I'm using what was offered yesterday at http://www.mediawiki.org/wiki/Special:ExtensionDistributor/MobileFrontend

I will try the git version tonight, with the hope that it works with 1.18.1. Otherwise I'll try to upgrade my MW installation (after checking that the other extensions installed are ok with that).

After installing MobileFrontend-master-58be6a7 this error is not seen in the logs. However, maybe there is a possibility that it doesn't even get there since I'm getting a PHP Fatal Error - see

Bug 36084 - PHP Fatal error: Call to undefined function wfAssembleUrl()