Extension talk:MobileFrontend

Jump to navigation Jump to search

About this board

If you have a feature request just request it here you'll get a much quicker reply :-) We are also around in #wikimedia-mobile if you want a quicker answer!

If you are trying to replicate behaviour you see on Wikimedia sites, please be sure to read through the configuration options before asking a question here.

page disappears when click in 'Search' box

Ahancie (talkcontribs)

In Mobile View (either on my phone or on my laptop), when I click in the search box, the entire screen goes completely white...absolutely nothing shows on the screen. I can still type something, even though I cannot see what I am typing, but after I hit enter the search feature works correctly. I tested this here, at mediawiki.org, and it does ALMOST the same thing....the page goes blank except for the search box. It is definitely better on mediawiki.org than on the site I am working on, but I would still consider it a bug in the code.

Dinoguy1000 (talkcontribs)

Have you tested using other mobile devices, or at least with a different browser on the same device? What happens if you try the mobile view with a desktop system?

GregRundlett (talkcontribs)
Reply to "page disappears when click in 'Search' box"


Summary by Jdlrobson

This explains how you can circumvent the lack of main menu customisation in MobileFrontend/Minerva skin.

Jackqbox (talkcontribs)
For anyone interested in an personal change of the menu 
edit includes/skins/SkinMinerva.php
  • find
protected function getDiscoveryTools()
  • find the line
// Nearby link (if supported)
  • add above this line
		$menu->insert( 'Upload' )
				$this->msg( 'mobile-frontend-upload-button' )->escaped(),
				SpecialPage::getTitleFor( 'Upload',
					MWNamespace::getCanonicalName( $config->get( 'MFContentNamespace' ) ) )->getLocalUrl() .
				MobileUI::iconClass( 'mf-upload-invert', 'before' ),
					'id' => 'uploadButton',
					'data-event-name' => 'upload',
		$menu->insert( 'ListImages' )
				$this->msg( 'mobile-frontend-listimages-button' )->escaped(),
				SpecialPage::getTitleFor( 'ListFiles',
					MWNamespace::getCanonicalName( $config->get( 'MFContentNamespace' ) ) )->getLocalUrl() .
				MobileUI::iconClass( 'mf-listimages-invert', 'before' ),
					'id' => 'listimagesButton',
					'data-event-name' => 'ListImages',

edit i18n/en.json
  • find the line
"mobile-frontend-random-button": "Random",
  • add below
"mobile-frontend-upload-button": "Upload",
"mobile-frontend-listimages-button": "List Images",
edit extension.json
  • find the line "mobile.mainMenu.icons": {
  • find section

"images": { "anonymous": "resources/mobile.mainMenu.icons/anonymous.svg",

  • add below this line
"upload": "resources/mobile.mainMenu.icons/upload.svg",
"listimages": "resources/mobile.mainMenu.icons/listimages.svg",

allocate the folder resources/mobile.mainMenu.icons
  • add in resources/mobile.mainMenu.icons the required 2 new svg files with the desired icon
  • upload.svg
  • listimages.svg

i have tested this modification at twh4u.ddns.net

Nicolas NALLET (talkcontribs)

Hi, With which versions of MediaWiki and MobileFrontend have you tested ?


Jackqbox (talkcontribs)

MediaWiki 1.28.0 PHP 5.5.38 (fpm-fcgi) MariaDB 5.5.51-MariaDB

also in older versions ,but i don't have any reference of them anymore. i am focussing right now on 1.28.x There are more easy and fancy menu changes possible like selectable menu items etc , but until now i don't need them. You can see the concept idea of them in an pubic dutch news side NOS . com

-- press pagina's wijzigen --

Aloist (talkcontribs)

Does this work also on Mediawiki 1.31?


Javascript errors with Mediawiki 1.32.0

4 (talkcontribs)

I just updated to MW 1.32.0 and also downloaded current master branch of the MobileFrontend extension. The extension throws a Javascript error:

ConfigException from line 53 of /var/software/mediawiki/includes/config/GlobalVarConfig.php: GlobalVarConfig::get: undefined option: 'EnableBlockNoticeStats'

This also seems to make Javascript based features of other extensions stop working.

Is there a fix or workaround?

احمد نورالله (talkcontribs)

I have the same problem here. Any news? (talkcontribs)
احمد نورالله (talkcontribs)

Yep, I have done the same and everything now is working. It seems that we installed wrong versions. Thanks for posting the solution.

Reply to "Javascript errors with Mediawiki 1.32.0"

GlobalVarConfig::get: undefined option: 'ResourceLoaderLESSVars'

Jamiehutber (talkcontribs)

I am getting the below error with 3.33 and trying to use Mobile Frontend with the following setup:

wfLoadExtension( 'MobileFrontend' );

$wgMFAutodetectMobileView = true;

$wgMFDefaultSkinClass = 'SkinVector'; // use Vector skin

MediaWiki internal error.

Original exception: [e21caa824241ba159b043d0d] /Main_Page ConfigException from line 53 of /var/www/gwart.co.uk/mediawiki/includes/config/GlobalVarConfig.php: GlobalVarConfig::get: undefined option: 'ResourceLoaderLESSVars'


#0 /var/www/gwart.co.uk/mediawiki/extensions/MobileFrontend/includes/MobileFrontend.hooks.php(707): GlobalVarConfig->get(string)

#1 /var/www/gwart.co.uk/mediawiki/includes/Hooks.php(174): MobileFrontendHooks::onBeforePageDisplay(OutputPage, SkinVector)

#2 /var/www/gwart.co.uk/mediawiki/includes/Hooks.php(234): Hooks::callHook(string, array, array, NULL, string)

#3 /var/www/gwart.co.uk/mediawiki/includes/OutputPage.php(2711): Hooks::runWithoutAbort(string, array)

#4 /var/www/gwart.co.uk/mediawiki/includes/MediaWiki.php(869): OutputPage->output(boolean)

#5 /var/www/gwart.co.uk/mediawiki/includes/MediaWiki.php(881): MediaWiki->{closure}()

#6 /var/www/gwart.co.uk/mediawiki/includes/MediaWiki.php(517): MediaWiki->main()

#7 /var/www/gwart.co.uk/mediawiki/index.php(42): MediaWiki->run()

#8 {main}

Exception caught inside exception handler: [e21caa824241ba159b043d0d] /Main_Page ConfigException from line 53 of /var/www/gwart.co.uk/mediawiki/includes/config/GlobalVarConfig.php: GlobalVarConfig::get: undefined option: 'ResourceLoaderLESSVars'


#0 /var/www/gwart.co.uk/mediawiki/extensions/MobileFrontend/includes/MobileFrontend.hooks.php(707): GlobalVarConfig->get(string)

#1 /var/www/gwart.co.uk/mediawiki/includes/Hooks.php(174): MobileFrontendHooks::onBeforePageDisplay(OutputPage, SkinVector)

#2 /var/www/gwart.co.uk/mediawiki/includes/Hooks.php(234): Hooks::callHook(string, array, array, NULL, string)

#3 /var/www/gwart.co.uk/mediawiki/includes/OutputPage.php(2711): Hooks::runWithoutAbort(string, array)

#4 /var/www/gwart.co.uk/mediawiki/includes/exception/MWExceptionRenderer.php(136): OutputPage->output()

#5 /var/www/gwart.co.uk/mediawiki/includes/exception/MWExceptionRenderer.php(53): MWExceptionRenderer::reportHTML(ConfigException)

#6 /var/www/gwart.co.uk/mediawiki/includes/exception/MWExceptionHandler.php(98): MWExceptionRenderer::output(ConfigException, integer)

#7 /var/www/gwart.co.uk/mediawiki/includes/exception/MWExceptionHandler.php(172): MWExceptionHandler::report(ConfigException)

#8 /var/www/gwart.co.uk/mediawiki/includes/MediaWiki.php(544): MWExceptionHandler::handleException(ConfigException)

#9 /var/www/gwart.co.uk/mediawiki/index.php(42): MediaWiki->run()

#10 {main}

Malyacko (talkcontribs)

"3.33" of what exactly?

Reedy (talkcontribs)

What is version 3.33?

Does your version of MobileFrontend match the MW version?

Jamiehutber (talkcontribs)

Sorry guys, my mistake. 3.33 of mediawiki. Interesting point about MFE match MW version. I will check that now.

Malyacko (talkcontribs)

3.33 of mediawiki does not exist. See Download

Jamiehutber (talkcontribs)

`<meta name="generator" content="MediaWiki 1.33.0-alpha"/>` I checked out the repo which contained 3.33 inside there as an alpha.

But your suggestion worked a treat, as mobileFrontend also had an version 3.33. Though I think this is buggy, being as it is also alpha.

I consider this fixed as far as the error goes.

Thanks you

Malyacko (talkcontribs)

Again: There is no 3.33. 1.33 is not 3.33.

Jamiehutber (talkcontribs)
Jamiehutber (talkcontribs)

It appears I am running version 2.1.0 of MFE:


"name": "MobileFrontend",

"version": "2.1.0",


Reply to "GlobalVarConfig::get: undefined option: 'ResourceLoaderLESSVars'"
JohanahoJ (talkcontribs)

The <small>-tag doesn't seem to have any effect in mobile view. Is that an expected behaviour or a temporary malfunction?

JohanahoJ (talkcontribs)

Ok, it's apparently in combination with the default Minerva skin this happens. With the Vector skin small-tags do have effect also in mobile view.

Reply to "Small-tag in mobile view"

Timeless and Vector look GREAT except NO TOC!

Titanshadow (talkcontribs)

I was looking at the Vector and Timeless skins and they look really nice on mobile, except the TOC shows up, blank. I don't mind the TOC being there, the sections are not collapsed like they are in the default skin. However, the TOC block is empty (says Contents and then nothing).

Is there a way to change this behavior?

Prod (talkcontribs)
Olekdia (talkcontribs)

Is there some workaround ? For example hide it via MediaWiki:Mobile.css ?

Olekdia (talkcontribs)

I have added:

#toc { display: none !important; } to MediaWiki:Mobile.js for now.

Please fix this, it is an old bug.

Reply to "Timeless and Vector look GREAT except NO TOC!"
Gerd-Lothar Reschke (talkcontribs)

I have the current version mediawiki-1.31.1 and the current versions of MobileFrontend + MinervaNeue. Everything works fine, but the Mobile.css doesn't load.

The page header has:

<link rel="stylesheet" href="/load.php?debug=false&amp;amp;lang=en&amp;amp;modules=mediawiki.hlist%7Cmediawiki.ui.button%2Cicon%7Cskins.minerva.base.reset%2Cstyles%7Cskins.minerva.content.styles%7Cskins.minerva.icons.images%2Cloggedin%7Cskins.minerva.loggedin.styles%7Cskins.minerva.mainPage.styles%7Cskins.minerva.tablet.styles&amp;amp;only=styles&amp;amp;skin=minerva">

<script async="" src="/load.php?debug=false&amp;amp;lang=en&amp;amp;modules=startup&amp;amp;only=scripts&amp;amp;skin=minerva&amp;amp;target=mobile"></script>

but the Mobile.css is lacking. In a former version (mw 1.26) everything worked.

Prod (talkcontribs)
Gerd-Lothar Reschke (talkcontribs)

You are right! I used this advice and now it works! Thanks!

(Strange that there seem to be so few people using Mobile.css.)

Mikumikuer (talkcontribs)

using JQuery like $("<div></div>").prependTo() in Widgets seems broke in mobile view, script output as plaintext.

How to fix this.

Reply to "jQuery script broken in MFview"

How can i add code between head tags?

Bekircem (talkcontribs)


I want to add Google Adsense ads code between head tags on mobile version. (Just mobile version, not the desktop version)

I look into minerva.mustache file but i can't reach in {{{headelement}}} tag. Any help?

Actually i want to enable page level ads. So i need to add codes into head tags in MobileFrontEnd extension. I am already use simple Adsense ads format on my wiki.


Reply to "How can i add code between head tags?"

Mobile / SkinMinerva broken on Safari with predictive keyboard turned on

1 (talkcontribs)

I observe a severe show stopper in MobileFrontend using SkinMiverva on iOS. The iOS keyboard can be switched to "predictive" mode. In this case the virtual keyboard shows another line above the keyboard but still below the "Done" line where it displays words which the user probably has meant while writing.

When editing a Wiki page this has the sad side effect that the caret is hidden by that additional line and you can no longer see what you are typing. You can't fix this issue easily: If you manually scroll then at the next key entry / return key pressed, the textarea again repositions the caret and you again cannot see it.

I would be grateful if this could be fixed or for some pointers where to start looking (I am not familiar with this extension and do not understand it sufficiently).

Reply to "Mobile / SkinMinerva broken on Safari with predictive keyboard turned on"