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.

New scripts to make it easier to edit Wikipedia using mobile interface

1
PAC2 (talkcontribs)

I've developed some extension to make editing Wikipedia easier using the mobile interface.

My script is available on the English version here https://en.m.wikipedia.org/wiki/User:PAC2/chouette.

The original script is designed for the French version : https://fr.m.wikipedia.org/wiki/Utilisateur:PAC2/chouette.js

Basically it adds links to what links here, move, pageviews, Wikidata, reasonator, etc.

I've another script making it easier to revert contributions : Utilisateur:PAC2/chouette-revert.js

Do you think it would be relevant to add those functionalities natively in the mobile view ?

Reply to "New scripts to make it easier to edit Wikipedia using mobile interface"

Google is mad at one of my pages

1
Sole Flounder (talkcontribs)

Somehow Google crawled one page and then toggled to the Desktop View version and now is saying my site is not completely mobile-friendly. What do?

Reply to "Google is mad at one of my pages"

undefined option: 'ResourceLoaderLESSVars'

1
Sakshale (talkcontribs)

Upgrade, using Softaculous, from 1.31.0 to 1.32.0.


The Site died with following error. "undefined option: 'ResourceLoaderLESSVars'"


Added "$wgResourceLoaderLESSVars = false;" to the end of LocalSettings.php and error disappeared.


@Sakshale

Reply to "undefined option: 'ResourceLoaderLESSVars'"

On Special:Nearby How to display articles from another namespace than the main one ?

1
Nicolas NALLET (talkcontribs)

I would like to display articles from a custom namespace on the page Special:Nearby

Thx

Reply to "On Special:Nearby How to display articles from another namespace than the main one ?"

page disappears when click in 'Search' box

3
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"

MODIFY THE MAIN MENU

4
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' )
			->addComponent(
				$this->msg( 'mobile-frontend-upload-button' )->escaped(),
				SpecialPage::getTitleFor( 'Upload',
					MWNamespace::getCanonicalName( $config->get( 'MFContentNamespace' ) ) )->getLocalUrl() .
						'#/test',
				MobileUI::iconClass( 'mf-upload-invert', 'before' ),
				[
					'id' => 'uploadButton',
					'data-event-name' => 'upload',
				]
			);
			
		$menu->insert( 'ListImages' )
			->addComponent(
				$this->msg( 'mobile-frontend-listimages-button' )->escaped(),
				SpecialPage::getTitleFor( 'ListFiles',
					MWNamespace::getCanonicalName( $config->get( 'MFContentNamespace' ) ) )->getLocalUrl() .
						'#/test',
				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 ?

Thanks

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?

Reply to "MODIFY THE MAIN MENU"

Javascript errors with Mediawiki 1.32.0

4
82.135.96.88 (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?

82.135.96.88 (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'

9
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'

Backtrace:

#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'

Backtrace:

#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!

4
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!"