Extension talk:MobileFrontend/2017
Add topicThis page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
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!
MODIFY THE MAIN MENU
[edit]- 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
- add in
- i have tested this modification at twh4u.ddns.net Jackqbox (talk) 02:24, 4 January 2017 (UTC)
- hello
- in the Address not found:
- For anyone interested in an personal change of the menu
- edit
includes/skins/SkinMinerva.php
- please check
- i am using mediawiki 1.33
- minerva:– (1903d1a)
- MobileFrontend: 2.1.0
- thanks@Jackqbox Sokote zaman (talk) 08:04, 16 December 2019 (UTC)
- w/skins/MinervaNeue/includes/skins 31.168.97.178 (talk) 14:02, 22 March 2020 (UTC)
- thanks Sokote zaman (talk) 15:54, 22 March 2020 (UTC)
- Hi,
- With which versions of MediaWiki and MobileFrontend have you tested ?
- Thanks Nicolas NALLET Wiki-Valley.com (talk) 10:12, 30 January 2017 (UTC)
- 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 -- Jackqbox (talk) 01:47, 31 January 2017 (UTC)
- Does this work also on Mediawiki 1.31? Aloist (talk) 15:15, 5 February 2019 (UTC)
- With MobileFrontend 2.1.0 and MW 1.32 insert:
- $menu->insert( 'Upload' )
- ->addComponent(
- $this->msg( 'mobile-frontend-upload-button' )->escaped(),
- SpecialPage::getTitleFor( 'Upload')->getLocalUrl() .'#/upload',
- MobileUI::iconClass( 'mf-upload-invert', 'before' ),
- [
- 'id' => 'uploadButton',
- 'data-event-name' => 'upload',
- ]
- );
- instead. Silkwood (talk) 13:10, 8 July 2019 (UTC)
- Hi! Thanks for this guide! Just finding trouble with the last part - When you say 'edit extension.json' where are you finding that file? I look in the MobileFront end extension.json but i cannot file mobile.mainMenu.icons in the code, not the folder in the resources folder 58.105.133.37 (talk) 00:19, 25 December 2019 (UTC)
- MobileFrontend extension has changed since 1.32 and mobile.mainMenu.icons disappeared in 1.33
- I don't know how to solve the problem so now I have a functioning Upload link without the upload Icon...
- We need some help or wait for MinervaNeue to become indipendent from MobileFrontend.
- Ciao.
Silkwood (talk) 12:47, 25 December 2019 (UTC)- Hi, I don't have the line "protected function getDiscoveryTools()" in my SkinMinerva.php. Is it due to some changes between versions of Minerva Neue? Is there any way how to customize/modify the side menu (main menu) for mobile frontend as is it possible in desktop version of MediaWiki (e.g. add AllPages to main menu)?
- Thank you! Bazantik (talk) 22:20, 12 April 2020 (UTC)
- I have the same issue. That line isnt present in SkinMinerva.php Exosvs (talk) 23:52, 5 June 2020 (UTC)
- Same issue. Those lines aren't present in the latest version of SkinMinerva.php that I just installed for MediaWiki 1.34.2.
- Does anyone have an updated method to add a few extra links to the MobileMenu?
- Thanks in advance. 75.164.85.179 (talk) 06:44, 20 July 2020 (UTC)
- As others have mentioned, this tutorial is somewhat outdated (
GetDiscoveryTools()
is no longer present in MinervaSkin.php). - So I made a simple script in Mobile.js that adds custom Mobile Menu items, with options for a nested dropdown menu as well.
- I thought I'd share it in case it helps anyone else: Extension talk:MobileFrontend/2020#h-How_to_Customize_Mobile_Menu_Links-2020-07-27T20:33:00.000Z Knomanii (talk) 02:55, 28 July 2020 (UTC)
mobile view instead of desktop view
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
My wiki InkluPedia.de is showing mobile view where desktop view is expected.
Example: https://inklupedia.de/wiki/Displacer is desktop version https://www.inklupedia.de/wiki/Displacer is mobile version
So mobile view is dependent from URL too. I recognized this some weeks ago without any known changes in configuration. I do not understand how to fix it. I want desktop version for both URLs unless someone is toggling view via button of the page, e.g. https://inklupedia.de/index.php?title=Displacer&mobileaction=toggle_view_mobile
This problem occurs in previous MediaWiki installation 1.26.2 and after update to 1.28.0 too. $wgMFAutodetectMobileView is set to true.
Any suggestions? InkluPedia (talk) 15:19, 26 January 2017 (UTC)
- What is the value of wgMobileUrlTemplate? Jdlrobson (talk) 17:50, 26 January 2017 (UTC)
- wgMobileUrlTemplate is not set InkluPedia (talk) 18:49, 26 January 2017 (UTC)
- I see the desktop version at both https://www.inklupedia.de/wiki/Displacer and https://inklupedia.de/wiki/Displacer
- If I switch to mobile via the mobile site link on https://inklupedia.de/index.php?title=Displacer&mobileaction=toggle_view_mobile and drop the mobileaction parameter from the url and refresh I still get the mobile site.
- If I click the desktop link on that page, drop the mobileaction query string and refresh, still good.
- Note that when you switch, a preference is stored locally via a cookie to make the view stick.
- Note if I visit https://www.inklupedia.de/wiki/Displacer?mobileaction=toggle_view_mobile (not sure how I get there) and then click the switch to desktop https://www.inklupedia.de/wiki/Displacer - I will get stuck in mobile mode on visits to the `www` domain as the desktop link points to a URL without `www`. Where you are seeing the mobile site, visit https://www.inklupedia.de/wiki/Displacer?mobileaction=toggle_view_desktop (with the www) and i suspect the problem will go away. You may want to try in an incognito window to rule out problems here.
- I think this would be solved by standardising on a canonical URL (which will also be good for your SEO) and either always use www or always drop it. Use a redirect further up the stack (htaccess for example) to enforce it. That should take away this problem. Jdlrobson (talk) 17:43, 27 January 2017 (UTC)
- Thank you very much. After deleting some cookies it works until switching view again. I need to check if it will help to enforce inklupedia.de to www.inklupedia.de or vice versa. InkluPedia (talk) 23:35, 28 January 2017 (UTC)
- I am enforcing now www.inklupedia.de to inklupedia.de via .htaccess. This avoids the problem and switching view is looking good too. Thanks for your support. InkluPedia (talk) 06:02, 30 January 2017 (UTC)
- No problem! Glad to help! Jdlrobson (talk) 17:10, 30 January 2017 (UTC)
Main page formatting question (ku.wiktionary)
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hello, Why this or this change does not change the formatting of the mobile on "ku.wiktionary" (m)? Thanks Ghybu (talk) 14:07, 30 January 2017 (UTC)
- I suspect it's because $wgMFSpecialCaseMainPage defaults to false as we're trying to discourage this usage in favour of using classes like `.nomobile` rather than encourage the maintenance of 2 main pages (see https://phabricator.wikimedia.org/T138622 for more information) Jdlrobson (talk) 17:13, 30 January 2017 (UTC)
- Thank you for the link! Ghybu (talk) 16:49, 31 January 2017 (UTC)
- The problem is that it works on all wiki except on ku.wiktionary ("Wîkîferheng")! I noticed that on ku.wiktionary the magic word {{SITENAME}} given "Wiktionary" and not the local name "Wîkîferheng" (problem reported here). Could these two problems be related?
- PS: I did a quick test on ku.wikipedia to see if there was no problem in the code, the result is here, it selects the part between "mf-" Ghybu (talk) 23:29, 1 February 2017 (UTC)
MobileFrontend failed to work after upgrade Mediawiki to 1.28
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Before 1.28 we set
if (req.http.host ~ "m\.moegirl\.org") {
set req.http.X-WAP = req.http.X-UA-Device;
}
to mobile view thorough m.moegirl.org. However, after upgraded Mediawiki to 1.28 it keep showing desktop view. We tried to modify the middle line to set req.http.X-Device = req.http.User-Agent; but it does not work either. Any idea on how to fix this? Deletedaccount4567435 (talk) 02:02, 1 February 2017 (UTC)
- Is the setting X-WAP/X-Device in varnish method been totally discard?
- How to send instruction from Varnish to MW for mobile view? Deletedaccount4567435 (talk) 19:40, 1 February 2017 (UTC)
- Ok I got it:
- Starting from the snapshot version 1.28, the default $wgMFMobileHeader was changed from X-WAP to X-Subdomain. You could either set $wgMFMobileHeader = 'X-WAP'; or modify your cache(Varnish) header setting. As long as them match MobileFrontend will work. Deletedaccount4567435 (talk) 21:50, 1 February 2017 (UTC)
Uncaught Error: Call to a member function getDBkey() on null
[edit]RESOLVED | |
Conversation no longer active. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
[04-Feb-2017 04:27:05 Asia/Shanghai] PHP Fatal error: Uncaught Error: Call to a member function getDBkey() on null in /extensions/MobileFrontend/includes/MobileFrontend.hooks.php:51
Stack trace:
#0 /extensions/MobileFrontend/includes/MobileFrontend.hooks.php(120): MobileFrontendHooks::getDefaultMobileSkin(Object(RequestContext), Object(MobileContext))
#1 /includes/Hooks.php(195): MobileFrontendHooks::onRequestContextCreateSkin(Object(RequestContext), NULL)
#2 /includes/context/RequestContext.php(406): Hooks::run('RequestContextC...', Array)
#3 /includes/context/ContextSource.php(153): RequestContext->getSkin()
#4 /includes/OutputPage.php(2305): ContextSource->getSkin()
#5 /includes/exception/MWExceptionRenderer.php(178): OutputPage->output()
#6 /includes/exception/MWExceptionRenderer.php(50): MWExceptionRenderer::reportHTML(Object(BadMethodCallException))
#7 /includes/exception/MWExceptionHandler.php(71): MWExceptionRenderer::output(Object(BadMeth in /extensions/MobileFrontend/includes/MobileFrontend.hooks.php on line 51 Deletedaccount4567435 (talk) 20:31, 3 February 2017 (UTC)
- What version of MediaWiki are you using? Bmansurov (WMF) (talk) 23:36, 7 April 2017 (UTC)
- mw 1.28.0 Deletedaccount4567435 (talk) 19:13, 9 April 2017 (UTC)
- I believe the line that's causing the issue has been removed in https://gerrit.wikimedia.org/r/#/c/261202/ Do you have an option to upgrade to a later version of MW? Bmansurov (WMF) (talk) 13:50, 10 April 2017 (UTC)
Fatal error: Class 'HtmlFormatter\HtmlFormatter' not found
[edit]RESOLVED | |
Conversation no longer active. Install HtmlFormatter. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I try all three version of Mobilefrontend on this page, and it seem not work. With REL1_28, and REL1_23, my whole wiki break down even with desktop browser, with REL1_27, it is OK with a desktop browser, but report error with a mobi brower, The error message is
Fatal error: Class 'HtmlFormatter\HtmlFormatter' not found in /var/www/extensions/MobileFrontend/includes/MobileFormatter.php on line 11
Here is my Special:Version info
MediaWiki (1.26.2)
PHP (5.5.9-1ubuntu4.20 (apache2handler))
SQLite (3.8.2 with full-text search support)
Elasticsearch (1.7.5)
MobileFrontend (1.0.0)
Could anyone help? Thanks. Jimmysitu (talk) 07:39, 4 February 2017 (UTC)
- You need HtmlFormatter. Bmansurov (WMF) (talk) 23:34, 7 April 2017 (UTC)
"We don't load common scripts"
[edit]RESOLVED | |
Tracked: |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hi,
The page ResourceLoader/Writing a MobileFrontend friendly ResourceLoader module says: "We don't load common scripts".
It appears, however, that the user's own common.js is loaded. I'm not sure why is it loaded if the site-wide common.js is not.
I'd also expect there to be an easy way to detect in JavaScript's runtime that we are on a mobile site, and there probably is such a way, but I couldn't easily find it. One way I found is if ( mw.config.get( 'skin' ) !== 'minerva' )
, but surely there is something more robust. Amir E. Aharoni {{🌎🌍🌏}} 09:54, 11 February 2017 (UTC)
- Can you raise a bug? There's been some changes to resourceloader which may have broken this. Thanks! Jdlrobson (talk) 21:10, 12 February 2017 (UTC)
- Here you go:
- Thanks! Amir E. Aharoni {{🌎🌍🌏}} 08:47, 13 February 2017 (UTC)
JavaScripts
[edit]RESOLVED | |
You'll need to edit the minerva.mustache file to add script tags to the page in new versions of MobileFrontend |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
In a previous version of this extension (namely 1.24c) I was able to load my plugin in this way:
----
protected function renderContentWrapper( $data ) {
$this->renderHistoryLinkTop( $data );
?>
<script src="/w/JavaScript/'''abcjs_plugin_2.1-min.js'''" type="text/javascript"></script>
<script type="text/javascript">
jQuery.noConflict();
ABCJS.plugin["hide_abc"] = true;
ABCJS.plugin["show_midi"] = false;
ABCJS.plugin["render_before"] = true;
</script>
<script>
if ( window.mw && mw.mobileFrontend ) { mw.mobileFrontend.emit( 'header-loaded' ); }
</script>
<?php
$this->renderPreContent( $data );
$this->renderContent( $data );
}
----
I would like to do the same thing in this 1.27 version.
Where to start? Silkwood (talk) 13:40, 14 February 2017 (UTC)
- You'll need to edit the minerva.mustache file to make these sorts of customisations now. Jdlrobson (talk) 21:40, 16 March 2017 (UTC)
MobileFrontend Nearby + GeoData does not work with unverified websites in Chrome 50+
[edit]RESOLVED | |
SSL is required to run the Nearby feature. This is now documented on Extension:MobileFrontend. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
SSL is required in order for Chrome to allow a website to ask for a user's location. RFlan (talk) 20:04, 19 February 2017 (UTC)
- Yes. This is a requirement by browser vendors. I've updated the extension page, thanks for pointing this out. Jdlrobson (talk) 21:41, 16 March 2017 (UTC)
Force Contents Dropdown List on Small Screens
[edit]RESOLVED | |
Tracked in https://phabricator.wikimedia.org/T147026 |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I've noticed that on screens larger than about 700px wide, a "Contents" box appears with a dropdown Table of Contents.
Is there any way to force that to appear on smaller screens?
If yes, is there any way to format the list for the narrower screen? JohnNew (talk) 20:54, 2 March 2017 (UTC)
- Not yet.
- The table of contents when rendered on mobile can take up the entire page for several scrolls so it's purposely not shown on mobile.
- This is tracked here: https://phabricator.wikimedia.org/T147026 Jdlrobson (talk) 21:39, 16 March 2017 (UTC)
Adding HTML after content?
[edit]RESOLVED | |
If you need to update the HTML of the Minerva skin you can edit the minerva.mustache file to add markup. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I use MW 1.27.1 combined with MobileFrontend 1.0.0 and in LocalSettings I have a hook to add some content on all pages of a wiki:
$wgHooks['SkinAfterContent'][] = function ( &$data, Skin $skin ) {
$data .= 'Some html footer after the content....';
};
However, this does not show in Minerva's "Mobile view" skin. Where and how may I add HTML to also show at the end of all MW pages in Mobile view? Yellowdog (talk) 21:26, 9 March 2017 (UTC)
- You might need to add an id containing the prefix "mf-" to the part to be displayed (or whatever the wiki is set to key on to display it on mobile view). DSquirrelGM𝓣𝓟𝓒 22:26, 9 March 2017 (UTC)
- Thanks for the tip. However, I'm not quite sure how and where the changes should be made. Is there anyone who can provide more specific details how and where to set the key or id with prefix? Yellowdog (talk) 08:02, 10 March 2017 (UTC)
- Instead of adding some html in LocalSettings to apply in Mobile view (since I still do not know how this can be done) a workaround is to include the html in the minerva.mustache file, right after <div id="content" class="mw-body">{{{contenthtml}}} for it to appear at the end of any content page.
- This works fine with the exception that I have several wikis using the same MobileFrontend extension, while the code should ideally only be apply to one of the wikis.
- Is there a way to include conditional output in minerva.mustache depending on which wiki is used?
- In a regular php program, I could add something like follows:
- if ($_SERVER["SERVER_NAME"] == "www.example.com") {
- helloworld!
- ?>
- But this isn't possible from within the minerva.mustache template file as far as I know.
- Does anyone have a better idea? Yellowdog (talk) 19:13, 10 March 2017 (UTC)
- I found where it's better done: MobileFrontend.skin.hooks.php Yellowdog (talk) 19:40, 10 March 2017 (UTC)
How to add some codes between the space of top menu and title?
[edit]RESOLVED | |
Conversation no longer active. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
How to add some codes between the space of top menu and title? Deletedaccount4567435 (talk) 23:44, 15 March 2017 (UTC)
- Zoglun, can you explain more? What are you trying to achieve? Bmansurov (WMF) (talk) 23:32, 7 April 2017 (UTC)
Misalignment of headings
[edit]RESOLVED | |
See the user's last comment. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I've enabled R1_27 on my instance of MediaWiki 1.27.1 running PHP 5.6.30 and Apache. The headings look like this:
http://elearning.lse.ac.uk/images/Mobile_view_wrong.png
All I've done is:
wfLoadExtension( 'MobileFrontend' ); $wgMFAutodetectMobileView = true;
Any ideas? Cjfryer (talk) 21:10, 21 March 2017 (UTC)
- Oh man, just posting this made me have another look. I'd also loaded the Tweeki skin, which I offered as a user preference. Removing that skin fixes it. Sorry. Cjfryer (talk) 21:26, 21 March 2017 (UTC)
Is there something wrong with the CSS?
[edit]RESOLVED | |
Please file a bug against the Extension:ContactPage and point them to ResourceLoader/Writing a MobileFrontend friendly ResourceLoader module |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
When using the ContactPage extension the input fields are all white and blend in with the white background, so it is difficult to see where to fill in.
Is this a CSS problem in MobileFrondend?
https://www.mediawiki.org/wiki/Extension:ContactPage
Fredrilj (talk) 21:02, 1 April 2017 (UTC)
- Yes, MobileFrontend resets the base styles at https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/resources/skins.minerva.base.reset/reset.less#L19. You can try and create a new rule at /wiki/MediaWiki:Mobile.css. Bmansurov (WMF) (talk) 23:29, 7 April 2017 (UTC)
How to hide?
[edit]RESOLVED | |
Fixed |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
How to hide some content for registered users? Or how to show content for anonyms only? Iniquity (talk) 16:58, 3 April 2017 (UTC)
Collapse working with MW 1.28.0 and MFE 1.1.0 on desktop, not mobile
[edit]RESOLVED | |
Conversation no longer active. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
On a main page this opens on the desktop, displays opened on mobile:
_________On site________
<div class="toccolours mw-collapsible mw-collapsed" "style="width:40em;">
This text is a heading
<div class="mw-collapsible-content">STUFF TO DO:
# In email to BH Tech support, note Recaptcha requires json.js
# Build quick front page with collapsible elements for mobile use
# Build pages for committees
# Build editable pages for event suggestions
# Build page with Google Maps to show membership location by town
# Mediawiki IFrame install Calendars and Google Docs
Build an administrators site
</div>
</div>
</div>
______End on site______
No reason to believe it's a cache-clear issue. Appreciate help. Thx 69.119.5.125 (talk) 23:08, 8 April 2017 (UTC)
- Please create a bug on Phabricator [1] and tag it with MobileFrontend. Bmansurov (WMF) (talk) 13:51, 10 April 2017 (UTC)
- What extension are you using?
- You'll need to add the jquery.makeCollapsible module which is not added by default on the Minerva skin. Jdlrobson (talk) 19:49, 11 April 2017 (UTC)
Does Wikipedia uses Mobilefrontend extension AND mobile subomains at the same time?
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I have setup a Mediawiki family and installed the Mediawiki Mobilefrontend Extension for better mobile usability.
The extension documentation says that it is used on Wikimedia projects (like Wikipedia).
The extension gives the same look as what Wikipdia looks like on mobile, however, I noticed a big difference.
The Wikipedia on mobile seems to go to a mobile subdomain, in addition to the format that the Moileforntend Extension provides.
for example, a page about the "World Cup" has this url when viewed on a desktop computer:https://en.wikipedia.org/wiki/World_Cup
while it has this url when viewed from a mobile phone: https://en.m.wikipedia.org/wiki/World_Cup
My questions are:
1- Is this really a redirection to a mobile subdomain? or a mirror installation?
2- What are the benefits of redirecting to a subdomain while the Mobiefrontend extension provides the formatting already.
3- How does the data gets synchronized between the main site and the mobile site? Atef81 (talk) 15:52, 20 April 2017 (UTC)
- Same installation.
- Can you elaborate?
- Both the main site and the mobile site use the same backend, the presentation is just different. Bmansurov (WMF) (talk) 17:53, 20 April 2017 (UTC)
- The main benefit is caching.
- If you are using any kind of caching for your HTML you may find it easier to do that on a separate subdomain rather than serve different experiences on the same domain.
- wgMobileUrlTemplate is how you do that. Jdlrobson (talk) 21:41, 20 April 2017 (UTC)
Displaying gallery images
[edit]RESOLVED | |
Gallery styles are designed to render differently on Skin:Minerva and will need to be adapted if problematic via Extension:TemplateStyles or MediaWiki:Mobile.css. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Mediawiki 1.27.1, MobileFrontend 1.0.0 (717861c) 19:21, 1. Sep. 2016
No matter which gallery mode we select, on a smartphone the images always appear one among the other. At least in packed mode images should be displayed side by side if the viewport width allows for more than one image per row. Can easily be seen at Help:Images
When simulating mobile view on a desktop PC or laptop, eveything is fine. AnonymusGdpr (talk) 19:47, 13 May 2017 (UTC)
- Anyone out there with any idea? AnonymusGdpr (talk) 14:23, 9 July 2017 (UTC)
- See https://en.wikipedia.org/wiki/Help:Gallery_tag#Usage_notes
- "When using, note that many parameters, specifically those relating to visual appearance may not apply or work as expected to certain skins (notably the Minerva skin used by the mobile site)"
- You'll need to invent your own rules if you need them. Jdlrobson (talk) 21:38, 3 August 2017 (UTC)
- I didn't see that special usage note before, sorry for annoying you.
- So you think the side-by-side appearance is something I can achieve by CSS? Unfortunately, in CSS I am a less-than-newbie. But I'll try anyway. AnonymusGdpr (talk) 09:56, 16 August 2017 (UTC)
Cannot be installed using the new wfLoadExtension function
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Attempting to install using wfLoadExtension, rather than the old require_once method, causes a 500 error, which on inspection is caused by the lack of an extension.json file.
Until this is fixed the article should be amended to still describe the installation process as utilising the older method. --~ Sauronjim (talk) 07:36, 5 June 2017 (UTC)
- MF has an extension.json file. Bmansurov (WMF) (talk) 14:02, 5 June 2017 (UTC)
- No it does not. Maybe it's supposed to, but the version I downloaded yesterday for the latest stable version of MediaWiki came without it. Below is the error caused when wfLoadExtension is used to include the MF extension. Additionally, running "ls extensions/MobileFrontend | grep extension" from the w/ directory returns no results, confirming that the missing json file is the reason.
- Fatal error: Uncaught Exception: .../w/extensions/MobileFrontend/extension.json does not exist! in .../w/includes/registration/ExtensionRegistry.php:107 Stack trace: #0 .../w/includes/GlobalFunctions.php(116): ExtensionRegistry->queue('/media/Database...') #1 .../w/LocalSettings.php(187): wfLoadExtension('MobileFrontend') #2 /.../w/includes/WebStart.php(124): require_once('...') #3 .../w/index.php(40): require('...') #4 {main} thrown in .../w/includes/registration/ExtensionRegistry.php on line 107
- The error does not occur when include_once is used instead. The MF article should be amended to recommend using the old method rather than the new one, since the new one causes failures. Sauronjim (talk) 00:39, 6 June 2017 (UTC)
- Can you share the URL you downloaded it from? Here is the file: https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/extension.json It's been there for a long time. Bmansurov (WMF) (talk) 18:05, 6 June 2017 (UTC)
- Special:ExtensionDistributor/MobileFrontend on this wiki.
- EDIT: I just did a checksum of the version I had downloaded previously and a new version I downloaded just now. They match. Sauronjim (talk) 09:56, 7 June 2017 (UTC)
- Which version did you download? I downloaded 1.28 (the latest) and I see extension.json in the downloaded file. Bmansurov (WMF) (talk) 18:57, 9 June 2017 (UTC)
- Yeah, it looks like the file does indeed include the json file. I'm not sure why it didn't get copied to my server properly. I followed the instructions provided, and the rest of the extension works fine, but for some reason the extension file disappeared. I'm wondering if it's some permissions issue or something. Regardless, I'm left very confused as to how this happened.
- Thanks for the help. Sauronjim (talk) 04:54, 10 June 2017 (UTC)
mf-* section docs
[edit]Just in case nobody's watching that page, I asked a question on main page formatting atTalk:Mobile_Gateway/Mobile_homepage_formatting :) Strainu (talk) 20:40, 19 June 2017 (UTC)
help...I want to be seen as a mobilefrontend on the desktop.
[edit]RESOLVED | |
You can. Enable Skin:Minerva as your default skin. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I want to be seen as a mobilefrontend on the desktop. 220.70.71.89 (talk) 10:27, 22 August 2017 (UTC)
- I'm not sure what the question is here...
- Are you asking whether it's possible to use the skin of the mobile site on desktop? If so, yes you can install the MinervaNeue skin and make it your default skin.
- If that doesn't answer your question, can you elaborate? 2600:8807:5407:CE00:BCEC:4746:C862:4A9B (talk) 14:50, 22 August 2017 (UTC)
Is it possible to display categories?
[edit]RESOLVED | |
https://phabricator.wikimedia.org/T24660 In mean time, these will be visible in beta mode via $wgMFEnableBeta (if enabled) |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Subject is the question. :-)
If it's not possible through the extension, is it possible via some CSS trickery? For example, could I put the categories in a <category> tag that I display on mobile but hide on desktop? Skonesam (talk) 13:13, 27 August 2017 (UTC)
- I know I'm missing something — and it's probably basic — but what do I need to do to display them? Seems like it's a feature… but it's not on by default, or at least it's not on for me.
- Just re-downloaded MobileFrontEnd with no change. I'm running 1.28; is that the problem?
- example page: https://usnamemorialhall.org/index.php/KEVIN_A._BIANCHI,_CDR,_USN Skonesam (talk) 13:01, 28 August 2017 (UTC)
- Categories are not shown in the HTML in the Minerva skin.
- You can however show a button that provides access to them by setting:
- $wgMinervaShowCategoriesButton = [ 'base' => true ]; Jdlrobson (talk) 17:44, 29 August 2017 (UTC)
- That was exceptionally simple — thank you! Skonesam (talk) 18:23, 29 August 2017 (UTC)
Displaying site name and mainpage title
[edit]RESOLVED | |
Configuring site name/logo is documented in the Minerva configuration README. The main page title is intentionally not shown in the Minerva skin. We don't plan to fix this as we feel that it should be obvious to a user that they are on the main page from the content they see. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hi,
I've set up MobileFrontend and Minerva in MediaWiki 1.28, but I seem to have two problems:
- The site name is not displayed in the mobile view. As an example, on http://mediawiki.org , the name "MediaWiki" is displayed between the menu button and search box. On my site, I can't find a way to display a site name in the same spot.
- On the Main Page, the title of the page is not displayed on mobile.
As a result, a visitor to the site's home page does not know what site they're on.
Is it possible to address either of these, even if it's a workaround? I can't find anything online.
Thank you! Dzollman (talk) 23:09, 27 August 2017 (UTC)
- The sitename in the top left can be configured with $wgMinervaCustomLogos
- e.g.
- ```
- $wgMinervaCustomLogos = [
- 'copyright' => '/w/extensions/MobileFrontend/logo.svg',
- ]
- ``` Jdlrobson (talk) 17:42, 29 August 2017 (UTC)
- Thank you! How would I configure the sitename as text, though? Is $wgMinervaCustomLogos documented somewhere? Dzollman (talk) 15:42, 13 September 2017 (UTC)
- For that matter, are the MobileFrontend and/or Minvera configuration options documented at all?
- I've spent hours looking for it, and can't find anything beyond the two or three examples provided on the Extension page. Dzollman (talk) 15:52, 13 September 2017 (UTC)
- Yes. They are in the repo in the README.md file. Jdlrobson (talk) 17:37, 24 August 2018 (UTC)
- Not that I've been able to find. If you do, please share! Skonesam (talk) 12:58, 14 September 2017 (UTC)
Main page won't expand H2
[edit]RESOLVED | |
Reported on phabricator as https://phabricator.wikimedia.org/T176414 |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
The headings appear, but there's no arrow on the left, the sections are unexpanded, and tapping doesn't expand anything. Observed on two different iPhones, in Safari and Chrome. Also in Safari and Chrome on Mac in mobile view.
Using the inspector (on Mac) there's no errors in the console until I click a heading, and then I get "Uncaught ReferenceError: mfTempOpenSection is not defined at HTMLHeadingElement.onclick"
The most annoying part of this is that it's only for the main page. All other pages display and operate (collapse/expand) as normal. Anyone have any idea what might be causing this? Skonesam (talk) 19:48, 29 August 2017 (UTC)
- I am having the same problem but have not managed to solve it yet. 2607:FEA8:4E0:3F:8039:3E4F:700E:ED5E (talk) 23:28, 1 September 2017 (UTC)
- Not a solution, but I've at least put a note in a DIV tag about what's going on. That DIV is set to hidden in the desktop css so it'll only show on the mobile page. Skonesam (talk) 12:56, 2 September 2017 (UTC)
- It's a silly work-around, but until I can come up with something better I have a "I'm sorry" message (in the "nodesktop" DIV) and a link to a "mobile_home" page that has the same information as my front page. H2s work great over there. Maddening. Skonesam (talk) 01:29, 5 September 2017 (UTC)
- I have the same Problem but have no solution. 109.164.202.182 (talk) 06:28, 5 September 2017 (UTC)
- Same here. No help even I remove the main page and recreate Harrysummer (talk) 04:29, 11 September 2017 (UTC)
- I don't see a bug report for this in their open issues: https://phabricator.wikimedia.org/tag/mobilefrontend/ but it looks like this has been happening for at least weeks? 24.56.238.143 (talk) 20:28, 17 September 2017 (UTC)
- Any idea how to submit a bug report? Skonesam (talk) 18:28, 18 September 2017 (UTC)
- Maybe here? https://phabricator.wikimedia.org/maniphest/task/edit/form/43/ Harrysummer (talk) 23:47, 18 September 2017 (UTC)
- Thanks! Added https://phabricator.wikimedia.org/T176414
- We'll see what happens… Skonesam (talk) 13:30, 21 September 2017 (UTC)
- My workaround, see https://drivrsdu.fr/dicof/w/index.php/Accueil (in french)
- 1) All Hn -> Hn-1
- 2) Put on the last line an Hn with title like "Rien" or "Nothing", or other. Touam (talk) 11:17, 2 October 2017 (UTC)
- Same problem here. Has anyone found a permanent fix? 203.149.77.98 (talk) 04:47, 5 October 2017 (UTC)
- My workaround is to add a custom script as the mfTempOpenSection function seems to be removed on the main page (though the minerva toggling script does seem to init on the sub pages somehow)
- //Removes the current mfTempOpenSection function so we don't get console errors on heading clicks
- $('.section-heading').prop('onclick',null);
- //Add a new function that changes the display parameter of the collapsible div associated to the clicked header
- $('.section-heading').click(function($event){
- var source = $event.target;
- var sectionHeadings = $('.section-heading');
- sectionHeadings.toArray().forEach(function(section){
- var span = section.getElementsByTagName('span')[0];
- if (span.id == source.id){
- var collapseDiv = section.nextSibling;
- collapseDiv.style.display = collapseDiv.style.display == "block" ? "none" : "block";
- return;
- }
- });
- });
- I added this to the MediaWiki:Mobile.js page so that it only runs in mobile view. Not the prettiest thing but at least the sections can show content now. 13.82.107.202 (talk) 18:54, 8 November 2017 (UTC)
- Simplest workaround -- just enclose your entire main page content in a div. This disables the MobileFrontEnd "feature" of nonexpanding headings on the main page. Maiden taiwan (talk) 04:40, 19 December 2017 (UTC)
How do i switch my site name to a svg image logo?
[edit]RESOLVED | |
Please read https://github.com/wikimedia/mediawiki-skins-MinervaNeue#config |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Just like they did on Wikipedia. Is there any way i can do that too? —File:LovelyA72 avatar.pngA72(留言·贡献) 03:57, 3 September 2017 (UTC)
Special:Nearby works from desktop but not from mobile view
[edit]I can see results of Special page Nearby, on my smartphone, only in desktop view, but not in mobile view (i use MobileFrontend extension ) Brunodapei (talk) 09:35, 3 September 2017 (UTC)
- Can you provide more information here? In what way is this broken? Jdlrobson (talk) 18:36, 27 August 2018 (UTC)
Table sorting not working in mobile version
[edit]RESOLVED | |
Tracked in https://phabricator.wikimedia.org/T111565 |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hi there
I have installed mobliefrontend and it is very nice!!!
ive just noticed that i can see my tables with sortable headers on the desktop version of my Wiki however not on the mobile version ?
<code>{| class="wikitable sortable"</code>
i have confirmed this as well by viewing it on my mobile phone as well as adding in view mobile version on my desktop.
Any help appreciated Bchuter (talk) 13:18, 15 September 2017 (UTC)
Page title and edit buttons not showing on Main Page
[edit]RESOLVED | |
Edit icons and title are not shown in Skin:Minerva on the main page. You are expected to append action=edit manually. |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
My Main Page is being treated differently, replacing the title in the <h1> tag with a welcome message and not showing the <ul id="page-actions"...> buttons to edit, watch, and read in another language. How can I have this page treated like every other article page? Jer Hughes (talk) 23:36, 24 September 2017 (UTC)
Logo in the footer
[edit]RESOLVED | |
This is explained in https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/master/README.md#config |
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
i want to add a logo (image) in the footer as a clickable hyperlink, can someone help? 93.201.90.183 (talk) 00:42, 9 November 2017 (UTC)
H2 can be expanded but Not collapse
[edit]Hi, I just upgraded my private wiki to MW 1.30.0. Now my Mobile page is good to see and possible to edit documents on my cellphone.
One issue is h2 expand/collaps work strange.
1. No image at left side if h2
2. When I touch h2, the section is expanded but could not collapse it.
Another strange thing is,
I set $wgMFCollapseSectionsByDefault = false; at LocalSettings.php but this was not working at cellphone,
I checked the talks and other configuration manuals to find what is wrong. Still I do not have clue.
If you have idea what to check, let me know.
Thanks. Naramoksu (talk) 02:49, 23 December 2017 (UTC)
- Does the star which indicates the page is being watched, images, and the TOC show up correctly in mobile view?
- Also, can you make sure that your Extension:MobileFrontend and Skin:Minerva Neue versions correspond to the MediaWiki core v1.30? AhmadF.Cheema (talk) 14:14, 30 December 2017 (UTC)
- Hi, thanks for your comments.
- Yes, Star, images, toc. None of them are displayed.
- I believe the version is correct. After I upgraded wiki, I downloaded extension for v1.30.
- At my special:version,
- minerva (7ee8663)
- Mobolefrontend 2.0.0 (5ecc673) Naramoksu (talk) 14:32, 30 December 2017 (UTC)
- AhmadF.Cheema,
- I saw your comment at the other topic. As your advice, I removed mineva skin directory and installed latest skin with git. Unfortunately, the mobile view was not changed.
- Please let me know what to check. Thanks. Naramoksu (talk) 15:28, 30 December 2017 (UTC)
- I checked version of Minerva skin. it was (7ee8663) same with old extension.
- I followed your procedure but not sure what is wrong. Naramoksu (talk) 15:35, 30 December 2017 (UTC)
- I was having the same issues as you, but was able to fix them by using the latest REL1_30 branch for the skin.
- In the Console of the browser developer tools (F12), are you getting any errors?
- Also, in case you have Extension:Gadgets enabled, try disabling it and see if it changes anything. Some .js gadgets might be interfering. AhmadF.Cheema (talk) 16:51, 30 December 2017 (UTC)
- Hi, AhmadF.Cheema,
- I followed your suggestion. Downloaded master version of MinervaNeue. its version is (cc984c2)
- There is no change in mobile view. But I'm glad to see the error "Fatal exception of type "BadMethodCallException" seems gone. which I had from mw1.28.
- Several error - "Error: Unknown dependency: mobile.init " were found at console. I think it could be solved when MobileFrontend updated.
- Thanks for advice. Naramoksu (talk) 00:49, 31 December 2017 (UTC)
- I get the same Console errors when things don't work, which is when I use the master version of the skin (cc984c2); for some reason, on my end they get fixed after using REL1_30 (7ee8663) (although for some reason my Special:Version doesn't update and continues to show the master version commit ID). AhmadF.Cheema (talk) 02:19, 31 December 2017 (UTC)
- I'm experiencing almost 1 year of mobile view trouble. As the media wiki becomes more complicated, it is getting harder for me to run the personal wiki myself. It would be nice to share your experience like this one.
- Happy new year! Naramoksu (talk) 08:57, 31 December 2017 (UTC)
- I had the same problem. In my case, it was Extension:Arrays which interfered with the Minerva skin and/or the MobileFrontend extension. Fortunately, at least in my case it works with version 2166695 of the Arrays extension (the last one of the master branch at the time of writing). CroMagnon (talk) 00:19, 13 April 2018 (UTC)
Not showing images in mobile version
[edit]Hi,
I have a mediawiki 1.30.0 installation with this estension, version 2.0.0 (5ecc673), and the MinervaNeue skin (7ee8663) (both downloaded from the extension distributor).
Using the mobile theme all jpeg images inside pages, referenced ad thumb, are not rendered, I just got gray rectangles.
You can see the effect on this page:
https://www.fountainpen.it/Sheaffer
I got an SVG correctly rendered and if I modify the page and look at the preview (in the mobile version) the images are there. S.piccardi (talk) 18:57, 27 December 2017 (UTC)
- same problem. reinstall skin but still no hope 184.82.206.100 (talk) 02:56, 9 February 2018 (UTC)
- I have the same problem, with any skin in Mobile visualization. Similar problem with navbox. Jmarchn (talk) 19:01, 23 February 2018 (UTC)
- I have same problem. MediaWiki 1.30. Extension MobileFrontEnd. Thumbnails are not showing. They are practically there, but sized to something like 2x2 px. After some testing I found that on page without any section header, thumbnails are shown. To be more exact. Any thumbnail image rendered before first section header is shown. All thumbnails after section, any section, are not rendered properly. Frames are there, but thumbnail image is reduced to 2x2 px. I'm using Vector skin. 188.64.24.145 (talk) 17:28, 1 March 2018 (UTC)
- I had the same problem. You need to upgrade to MobileFrontend 2.1.0 (simply choose correct version of your MediaWiki at https://www.mediawiki.org/wiki/Special:ExtensionDistributor/MobileFrontend). Then async loading of images works again. Radouch (talk) 20:32, 11 October 2020 (UTC)
- Sounds like you are running some incompatible versions.
- You can disable lazy loading images in the meantime.
$wgMFLazyLoadImages = ['base'=> false ];
Jdlrobson (talk) 15:49, 9 March 2018 (UTC)