Extension talk:MobileFrontend/2016
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!
Errors in MediaWiki 1.26.2
[edit]Hi all,
The issue in Extension talk:MobileFrontend/2015#h-I'm_getting_loads_of_errors_on_MediaWIKI_1.26-2015-11-30T19:08:00.000Z appears to have resurfaced again. I got around it by checking out 13a5fcca50cc630baee44a6aa21291602aac3ace (as the closest commit I could see to when Trunzoc confirmed it working), but the current master has the same issue as previously reported. WheelieBinSA (talk) 04:37, 6 January 2016 (UTC)
- User:WheelieBinSA I'm not sure what to suggest but it does sound like you are running incompatible versions - that's the only way this will happen :-/ Jdlrobson (talk) 00:01, 29 January 2016 (UTC)
Hide Icons and remove hamburger menu in mobile
[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 a wiki that I don't want people to be able to edit and want to get rid of the default icons at the top and remove the hamburger menu as there is no way for people to use this.
How can I remove those icons and menu? Davidwinegar (talk) 15:55, 19 January 2016 (UTC)
- You can use MediaWiki:minerva.css to hide the hamburger. $wgMFPageActions =array(): will hide the edit, watch etc icons Jdlrobson (talk) 18:59, 19 January 2016 (UTC)
- Thanks for the suggestion, but every time I try to use the $wgMFPageActions =array(): My site will not load at all - it just is blank. Any idea why that would be? Davidwinegar (talk) 06:39, 20 January 2016 (UTC)
- You should look at Manual:Errors_and_symptoms#You_see_a_Blank_Page. In this case, @Jdlrobson: had a type error in the code. Instead of
$wgMFPageActions =array():
, you should use$wgMFPageActions =array();
":" -> ";" Florianschmidtwelzow (talk) 08:03, 20 January 2016 (UTC) - Thanks for the error correction, but I am still unable to achieve a page without the icons. I can get rid of Talk when viewing in the PC browser and switching to mobile view, but on the iphone it sill shows all the icons when adding $wgMFPageActions =array(); Any other ideas? This has been haunting me now for a couple of years as to how to get rid of these icons.
- Take a look at: http://cafecarusel.ibeacon.fi//index.php?title=Main_Page&mobileaction=toggle_view_mobile Davidwinegar (talk) 13:02, 21 January 2016 (UTC)
- OK managed to get it to work - seems the mobile.css page was missing and when I restored it, it now has worked to get rid of the icons :-)
- But for others struggling with this I just noticed that you need in Mobile.css the following code:
- #page-actions {display: none;}
- Now I just need to get rid of the hamburger menu - anyone know what CSS code I should add to remove it? Davidwinegar (talk) 13:20, 21 January 2016 (UTC)
- mw-mf-main-menu-button {display:none;}
- or .header div:first-child { display: none; }
- should do it Jdlrobson (talk) 17:14, 22 January 2016 (UTC)
Using with different skins
[edit]RESOLVED | |
You can use MobileFrontend with a different skin than Minerva. |
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 noticed the the default skin setting: does that mean mobile front can work with different skins? Foreground & some of the Bootstrap skins are already mobile friendly, but they don't have geo targeting abilities like MobileFront does, so would MobileFront work on them? Could Foreground be set as the default skin? And than have the other abilities of this extension, or does the extension need it's own skin?
thanks Christharp (talk) 23:08, 28 January 2016 (UTC)
- Theoretically yes! :-)
- The skin used by the mobile site is SkinMinerva and is compatible with other skins.
- You can enable another skin in LocalSettings.php using
$wgMFDefaultSkinClass = 'SkinBootstrap';
- where SkinBootstrap is the class name of the skin you want to include.
- You may find this loads a skin minus styles. This is easily fixable by filing a bug against the skin owner to allow their styles to run on mobile.
- Not many people have expressed an interest in this, so it would be great to get some momentum and I'm happy to code review any patches you or others may want to submit to improve things in this area.
- I wrote https://gerrit.wikimedia.org/r/#/c/261202/ which if merged (ping User:Florianschmidtwelzow) would allow you to use useskin=vector in the address bar and set a user preference 'mobileskin' - it's on my to do list to allow that to be surfaced in the Special:Preferences page... Jdlrobson (talk) 00:00, 29 January 2016 (UTC)
- Thanks for the reply & even more so at the speed of the reply.
- I'm setting up a new wiki right now and I hopefully be able to test the $wgMFDefaultSkinClass within a week or so. I'll report back after I do so. Christharp (talk) 02:19, 29 January 2016 (UTC)
- To be clear I think we'll need some patches to the skins you want to use, but I don't see why we can't make those changes happen :-) Jdlrobson (talk) 21:58, 29 January 2016 (UTC)
Using with Maps extension
[edit]RESOLVED | |
Maps extension my not be compatible with 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.
When toggle to mobile view, wiki page could not load google maps data by Maps extension.
In checking the Chrome Developer Tools, I can't find "/load.php?debug=false&modules=ext.maps.common%2Cgooglemaps3". Maru333 (talk) 13:47, 2 February 2016 (UTC)
- Does the Maps extension define the module to be loaded in mobile (target = mobile)? If not, it will not be loaded in mobile view, thi is,ostly, a problem in the other extension, not MobileFrontend itself :) Florianschmidtwelzow (talk) 15:33, 2 February 2016 (UTC)
- Ping User:MaxSem is this an oversight? Jdlrobson (talk) 17:06, 2 February 2016 (UTC)
- (or is the extension different from your maps service?) Jdlrobson (talk) 17:07, 2 February 2016 (UTC)
- Thanks!
- I'm challenging to work Map3.4 + MobileFtontend1.0.0 on Mediawiki1.26.2.
- Extension:Maps
- ResourceLoader/Writing a MobileFrontend friendly ResourceLoader module Maru333 (talk) 07:21, 3 February 2016 (UTC)
- Yep, you need to add the mobile target to any module, which is really needed (see the resources file). But please (think about the data plans of your visitors :P) don't simply add the mobile target without thinking about the module. Mobile-friendly modules should be as small as possible to save as much data as possible. For this, you should only load modules you _really_ need to do what the extension should do. Maybe you've do rewrite modules to work with as less (external) dependencies as possible. Florianschmidtwelzow (talk) 14:36, 3 February 2016 (UTC)
ConfirmEdit is compatible with MobileFrontend extension?
[edit]RESOLVED | |
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,
Did ConfirmEdit is compatible with MobileFrontend extension? Because when editing article on my wiki using MobileFrontend extension I don't see any captcha code, and i can't edit anything.
Regards
Azot944 NH35 (talk) 12:26, 29 February 2016 (UTC)
- @Azot944: It isn't really, only text based (QuestyCaptcha/MathCaptcha) and image based (FancyCaptcha) CAPTCHAs are supported in general, but the only thing really tested is FancyCaptcha unfortunately :( Florianschmidtwelzow (talk) 21:51, 29 February 2016 (UTC)
- In the future, it is possible full integration with Confirm Edit? NH35 (talk) 17:29, 1 March 2016 (UTC)
- I've opened phabricator:T128487 to work on this (could you provide the CAPTCHA module you use?). Florianschmidtwelzow (talk) 18:11, 1 March 2016 (UTC)
- Thanks for reply :)
- ReCaptcha NoCaptcha (I'm not robot) NH35 (talk) 11:44, 2 March 2016 (UTC)
Logo not showing
[edit]RESOLVED | |
Found the problem: $wgMobileFrontendLogo was called in the LocalSettings.php file right after the main logo and before the MobileFrontend extension. |
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 just installed the MobileFrontend extension on a new MediaWiki installation (version 1.26.2). It works fine, except that the mobile logo does not show up (I understand that by design it is only supposed to appear on the login and sign-up pages).
I have this in my LocalSettings.php file: $wgMobileFrontendLogo = "$wgScriptPath/logo_mobile.gif"; (for good measure I also tried $wgResourceBasePath).
The behaviour is consistent across different devices and browsers. I also purged the cache.
Any ideas? Naersjoen (talk) 15:42, 13 March 2016 (UTC)
- Can you provide the URL of your wiki? What do you see in the source code of the page? Maybe the logo is simply not there where you think it is (false directory, false image name, ...) :) Florianschmidtwelzow (talk) 16:13, 13 March 2016 (UTC)
Sidebar items
[edit]RESOLVED | |
See Extension talk:MobileFrontend/2017#h-MODIFY_THE_MAIN_MENU-2017-01-04T02:24:00.000Z |
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, Is there a way to include the Mediawiki:Sidebar items in the menu ? Fraifrai (talk) 10:41, 18 March 2016 (UTC)
- I found a trashy hack
- Fraifrai (talk) 10:39, 22 March 2016 (UTC)
/** * Render side menu as lists * @param array $data Data used to build the page */ protected function renderMainMenu( $data ) { ?> <ul> <?php foreach( $this->getDiscoveryTools() as $key => $val ): echo $this->makeListItem( $key, $val ); endforeach; ?> </ul> <?php // PATCH FSN : Ajout des la sidebar echo "<ul style="border-bottom: 12px solid #252525;">"; foreach ($this->data['sidebar'] as $bar => $cont) { foreach($cont as $key => $val) { echo $this->makeListItem( $key, $val, array ('link-class' => 'icon icon-nearby icon-text') ); } } echo " </ul>"; // FIN PATCH FSN ?> <ul> <?php foreach( $this->getPersonalTools() as $key => $val ):
- For what this is worth, the English wikisource has a javascript+CSS gadget for this as well: MediaWiki:Gadget-FlatSidebar.js & MediaWiki:Gadget-FlatSidebar.css. (A warning, though, this code is probably very specific to the Vector skin in that environment.) AuFCL (talk) 07:17, 8 May 2016 (UTC)
- where does this code go ? could you attribute the code, have a link to the original ? thank you! 173.11.122.46 (talk) 05:59, 8 May 2016 (UTC)
- this function is in includes/skins/MinervaTemplate.php: Fraifrai (talk) 14:13, 17 May 2016 (UTC)
- see the above subject: MODIFY THE MAIN MENU
- is easy to add items ^_^ Jackqbox (talk) 17:14, 4 January 2017 (UTC)
"<div id="mf-" tags not working with MW1.23
[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'm using MobileFrontend on a wiki based MW 1.23 (that I can't update) and I can't use "
MobileFrontend Autodetect Mobile View doesn't work
[edit]Hi.
I've been using for a long time. But autodetect mobile view doesn't work anymore. Here is my Localsettings.php setting for MobileFrontend extension:
#MobileFrontEnd
require_once "$IP/extensions/MobileFrontend/MobileFrontend.php";
$wgMFAutodetectMobileView = true;
How i fix it? Thank you. Bekircem (talk) 01:16, 21 April 2016 (UTC)
Bug: missing categories
[edit]RESOLVED | |
Tracked in https://phabricator.wikimedia.org/T133411 |
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 not found any way to display the categories at bottom of pages on the mobile version.
There's :
- no collapsible option for them, and
- no configuration option in panel displayed from the left-side "Configuration" menu, which only allows selecting if we want to display images (on by default) or not.
- no item in the left menu pane as well to list these categories on demand
How can we navigate categories on mobile wikis ??
We can only list the content of a category, provided we find a link to it, but no way to see the categories of pages, or parent categories of categories !!!
This is an important bug that impact severely almost all pages on Mobile MediaWiki (and notably those that are supposed to be navigated most by categories only) Verdy p (talk) 17:46, 22 April 2016 (UTC)
New section for non talk namespace page?
[edit]Hi,
For the non-mobile site, a new section is added via this format: https://en.wikipedia.org/w/index.php?title=Talk:Noisy_miner&action=edit§ion=new But https://en.m.wikipedia.org/w/index.php?title=Talk:Noisy_miner&action=edit§ion=new doesn't work properly. The action=edit query string is intepreted properly and you get sent to an edit page, but section=new seems to be ignored. (This causes problems with the Extension:InputBox and probably other things.)
You can add a new section via the mobilefront end using this format https://en.m.wikipedia.org/wiki/Noisy_miner#/talk/new . But I don't understand it enough to do it at page outside the talk namespace, e.g. https://en.m.wikipedia.org/wiki/Wikipedia:Reference_desk/Science if it's possible.
I did search, but didn't have much luck. Actually for a while I didn't know how to add a new section at all since https://en.m.wikipedia.org/wiki/Talk:Noisy_miner doesn't seem to have any "new section" links. I admit somehow I've never noticed talk at the bottom of the article page before, or maybe it's new. I've always gone to talk pages by modifying the URL on the mobile site but happened to get there after reading something on this page.
P.S. Let's not worry about Flow. While I don't dislike it as much as some, I have found some limitations before with my very little use. In fact, this is the second time I'm typing out my message. While it's always slightly risky to navigate away from a page, I've found with Firefox on Windows the risk is very low. Anyway I accidentally did it earlier on this page, received no warning and lost my nearly completed message! More to the point, there are a lot of people who really really dislike it, so it's going to be a hard sell getting them to move. I do agree typical talk pages aren't ideal for many mobile devices, but "new section" seems to be one thing which could work okay.
Cheers Nil Einne (talk) 15:43, 2 May 2016 (UTC)
- I was just reminded that the new section thing doesn't work for non logged in editors anyway. I seem to recall I knew this at one tine and rereading the above, it seems I first found out about how to add new section around the time of writing that. So maybe I forgot about it or something (I seem to recall thinking the situation was hopeless at one time, possibly I was tired and confused myself). In any case, I guess the answer is that there's no way to add new sections for non talk pages. Even if the talk page method could be made to work, it would only work if logged in. Nil Einne (talk) 14:36, 28 June 2016 (UTC)
Preload
[edit]Possibility for preload the default preload sites?
Boilerplate or template:preload
The default/classic site view working great with preload or Boilerplate extension. On the mobile view they are not loaded the preload / Boilerplate text. 109.43.0.82 (talk) 11:06, 6 May 2016 (UTC)
Images lightbox problem with Russian lang
[edit]RESOLVED | |
I believe this is the bug that was tracked in https://phabricator.wikimedia.org/T147738. You'll need to apply the fix. or upgrade 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.
Hi! I cant load any images via MobileFronted media.viewer... But this problem appears only with Russian language, i've tried it on several hosting... When i swith MediaWiki Core language to en everything goes perfectly. And this happens only on iOS, my computer loads mobile version OK.
As an image adress i get something like this:
http://profaeria.ru/index.php/Держать_строй!#/media/$09;:%1A0@B0_45@60BL_AB@>9.png
The real adress is: http://profaeria.ru/index.php/Держать_строй!#/media/Файл:Карта_держать_строй.png
Where Держать_строй! (Name of my page), Файл: (File:), Карта_держать_строй.png (Name of my file).
On the english language it will look like: http://profaeria.ru/index.php/Name_of_my_page#/media/File:File_name.png
Please, help me. This extension works perfectly with russian on Gamepedia sites.. 91.103.108.76 (talk) 20:27, 18 May 2016 (UTC)
- Hey sorry for the delay I've been unable to debug this so far. Clicking on the image on http://profaeria.ru/index.php/Держать_строй seems to work fine for me.
- What version of iOS are you using and which browser? Sounds like some kind of double encoding issue.... Jdlrobson (talk) 22:40, 31 May 2016 (UTC)
- Can't reply... Read my message down. G825 (talk) 09:33, 1 June 2016 (UTC)
- Im using safari on iOS 8.3 + iOS 9.3 (2 devices), but i've tried chrome and nothing has changed. I got this problem only on my own websites (i've tried 3 different hosters, with different versions of php/mysql), for example, i open gamepedia sites (that uses mobile fronted) and on them everything loads as should.
- I got the same problem with safari on MacBook, but other browsers deals with adress.
- When i try to open image in safari on MacBook with mac os the url looks like: http://profaeria.ru/Держать_строй!#/media/$09;:%1A0@B0_45@60BL_AB@>9.png (Where $09; shoud be Файл:, and %1A0@B0_45@60BL_AB@>9 shoud be Карта_держать_строй).
- Whe i open Opera/Chrome/Mozilla on MacBook with Mac OS the url look like: http://profaeria.ru/Держать_строй!#/media/Файл:Карта_держать_строй.png (the right adress of my file) and it opens perfectly, while it is not loading in safari. 37.110.88.174 (talk) 09:22, 1 June 2016 (UTC)
- When I click http://profaeria.ru/%D0%94%D0%B5%D1%80%D0%B6%D0%B0%D1%82%D1%8C_%D1%81%D1%82%D1%80%D0%BE%D0%B9!#/media/%D0%A4%D0%B0%D0%B9%D0%BB:%D0%9A%D0%B0%D1%80%D1%82%D0%B0_%D0%B4%D0%B5%D1%80%D0%B6%D0%B0%D1%82%D1%8C_%D1%81%D1%82%D1%80%D0%BE%D0%B9.png in Safari I get the desktop site. Can I confirm you see the issue on the mobile site? In the mobile site (Safari 9.1.1) it works fine for me. What version of Safari are you using?
- It sounds like this is https://phabricator.wikimedia.org/T111609 so you may want to upgrade or patch your instance with https://gerrit.wikimedia.org/r/240688 Jdlrobson (talk) 17:00, 1 June 2016 (UTC)
- I am using both 9.3 and 8.3 iPhones+9.3 iPad+10.10 Mac OS. When I click the images it loads the mobile viewer (I can post a screenshot, if you wish).
- And on all of tested devices ONLY in the safari I got the wrong url with strange symbols.. 37.110.88.174 (talk) 11:41, 5 June 2016 (UTC)
Fatal error of class HTMLFormatter not found
[edit]I'm testing it in my localhost right now, and viewing my pages on a 'normal' screen (as in without a mobile screen emulation on my Chrome browser) displays the screen without any problems. However, when I view it on a mobile screen (via Chrome developer tools), I receive a blank page with this error:
Fatal error: Class 'HtmlFormatter\HtmlFormatter' not found in C:\Bitnami\mediawiki-1.26.2-1\apps\mediawiki\htdocs\extensions\MobileFrontend\includes\MobileFormatter.php on line 11
mbstring is enabled in php
in localsettings.php: require_once "$IP/extensions/MobileFrontend/MobileFrontend.php"; $wgMFAutodetectMobileView = true;
Any suggestions? 61.238.70.57 (talk) 03:39, 27 May 2016 (UTC)
- Did you run composer update in the mediawiki core directory? Jdlrobson (talk) 04:24, 27 May 2016 (UTC)
- What would the composer update be exactly? I ran an installer from getcomposer.org/, and I went to http://localhost/mediawiki/mw-config to upgrade mediawiki again. The page still does not load up. 61.238.70.57 (talk) 07:36, 27 May 2016 (UTC)
- composer update is a command you need to run in the mediawiki core directory upon installing MediaWiki (see Composer#Usage in MediaWiki core) Jdlrobson (talk) 16:47, 30 May 2016 (UTC)
- It sounds like you may have incompatible versions of Mobilefrontend and MediaWiki (specifically a newer version of the latter). Could you post what versions you see in Special:Version (please include the number in brackets)? I suspect either rolling back to an older MobileFrontend or newer MediaWiki version will fix your problem. Jdlrobson (talk) 16:46, 30 May 2016 (UTC)
- Hi, Jdlrobson
- I have the same issue, 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 you help? Thanks. Jimmysitu (talk) 03:10, 24 January 2017 (UTC)
- I have the same error: mediawiki 1.26.3 and MobileFrontend REL 27. I've been struggling for two days and I cannot make this thing work. mastering is enabled in php, local settings is okay too. Any suggestions? 181.228.189.51 (talk) 19:35, 26 July 2016 (UTC)
Download link broken
[edit]RESOLVED | |
Tracked in T136564 |
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 that, I obtain a 404 error. Thanks. SNDK (talk) 02:42, 30 May 2016 (UTC)
Make Subsections Expandable in MediaWiki MobileFrontEnd
[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.
In mobile version of MediaWiki, sections H2 are expandable. I would like the subsections H3 (and H4, if possible) are expandable too. How is it possible? Thank you!
I found this in MobileFrontEnd/includes/MobileFormatter.php, maybe it can be modified:
/** * Makes sections expandable * * @param string $s * @param string $tagName * @return string */ protected function headingTransform( $s, $tagName = 'h2' ) { wfProfileIn( __METHOD__ ); $tagRegEx = '<' . $tagName . '.*</' . $tagName . '>'; $s = $this->pageTransformStart . preg_replace( '%(' . $tagRegEx . ')%sU', $this->headingTransformStart . '\1' . $this->headingTransformEnd, $s ) . $this->pageTransformEnd; wfProfileOut( __METHOD__ ); return $s; } protected function onHtmlReady( $html ) { wfProfileIn( __METHOD__ ); if ( $this->expandableSections ) { $tagName = strrpos( $html, '<h1' ) !== false ? 'h1' : 'h2'; $html = $this->headingTransform( $html, $tagName ); } wfProfileOut( __METHOD__ ); return $html; }
Humanutario (talk) 15:58, 2 June 2016 (UTC)
Redirect MediaWiki Subdomain to Mobile Version
[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 am using the MobileFrontend extension for MediaWiki 1.23. How can I do to redirect the subdomain m.wiki.org to the mobile version?
I followed the MobileFrontend instructions and added $wgMobileUrlTemplate = "m.%h1.%h2";
to the LocalSettings.php. But when I click on "Mobile version" at the bottom of the page, I have a "Server not found" error.
I precise that the "Mobile version" link do redirects to m.wiki.org. I precise too that without the $wgMobileUrlTemplate = "m.%h1.%h2"
parameter, the mobile version works - but there is no subdomain associated to the mobile version. How can I set up this subdomain? Thanks so much! Humanutario (talk) 15:59, 2 June 2016 (UTC)
- Hi, Did you get an answer to this question? or what did you end up doing? As I am in the same situation. Thanks Atef81 (talk) 16:13, 20 April 2017 (UTC)
- @Atef81 does adding the config:
- $wgMFMobileHeader = 'X-Subdomain';
- help? Jdlrobson (talk) 21:47, 20 April 2017 (UTC)
Translation of configuration options
[edit]We had translated some configuration options into Japanese until https://www.mediawiki.org/w/index.php?title=Extension:MobileFrontend/ja&oldid=2180852, but they were lost along with the migration to GitHub. Where should we post translations now? ocha (talk) 05:19, 21 July 2016 (UTC)
- Hi @Ochaochaocha3 that's a good question. I wasn't aware of translations existing so thank you for bringing these to my attention!
- @Nikerabbit is there any similar patterns for translating README's?
- @JHernandez (WMF) we could automatically deploy the README to a wiki page (we'd have to convert from Markdown to MediaWiki however) Jdlrobson (talk) 18:52, 21 July 2016 (UTC)
- @Ochaochaocha3 The migration was from the wiki page to the code repository (active one is in gerrit https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/MobileFrontend, github is a mirror of that one).
- The reason is that configuration is very dependent on the version of the code, so by being tied to the code it is versioned with it. So if you need to check the configuration variables for a release/version of MobileFrontend, with checking the README of the code you'll have up to date documentation. In the wiki it was hard to check docs for older versions of MobileFrontend and relate the documentation with the code.
- The problem as mentioned is having multilanguage docs for the config. I think there are two possible solutions:
- Have translations of README.md (something like README.ja.md)
- Translators need to be comfortable with git/gerrit (higher barrier to entry)
- Maybe hard to keep translations up to date with code?
- Have subpages of Extension:MobileFrontend on mediawiki.org with translations of the latest configuration
- Similar workflow as before
- Markdown to wikitext conversion needed (either manually or automatically)
- Doable with something like pandoc or parsoid (markdown to html and html to wiki via parsoid)
- Have translations of README.md (something like README.ja.md)
- What do you feel more comfortable with? I lean towards having Extension:MobileFrontend/Configuration listing subpages and explaining that this is the latest config from the repository and it's translations, and then having language specific translations at Extension:MobileFrontend/Configuration/ja for example.
- Thoughts? JHernandez (WMF) (talk) 08:12, 15 August 2016 (UTC)
- @JHernandez (WMF) Thank you for giving me the details! I think the latter is preferable, because the Translate extension is widely used for translating MediaWiki-related documents and it makes it easier to update translations. ocha (talk) 01:29, 17 August 2016 (UTC)
- Ok, I've created a phab ticket T143308 to chat about this and added you, to talk with other devs about it and figure out a good way forward. I've summarized what's up and options, please chime in and let's keep the discussion there. Once we come up with the approach we'll work on it!
- Sorry for the inconveniences @Ochaochaocha3 JHernandez (WMF) (talk) 10:23, 18 August 2016 (UTC)
How to Add Google Adsense?
[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 Want add Google Adsense. Kiwkius (talk) 19:53, 5 August 2016 (UTC)
- you can dream that you have a proper google adsense setup with mediawiki, even smaller garbage cms like wordpress can leverage adsense and make money more than 7 million article wiki. 2001:8F8:1E23:DE9:28:C70:94FF:F3EF (talk) 05:25, 17 August 2020 (UTC)
- on top of that, wikimedia and its family doesn't really care if adsense is working or not, they are getting donations, so they don't have to bother with adsense to cover running cost. 2001:8F8:1E23:DE9:28:C70:94FF:F3EF (talk) 05:27, 17 August 2020 (UTC)
- Since this question isn't related to Extension:MobileFrontEnd, you might try asking over at Project:Support desk. Knomanii (talk) 19:56, 20 August 2020 (UTC)
Responsive image resizing issue
[edit]I'm using Version 1.27 and I'm trying to figure out how to get tables to display image sizes equally rather than having five images with all different sizes. I apologize if this was answered, I couldn't find it if so. Crobats (talk) 22:32, 11 August 2016 (UTC)
- https://i.gyazo.com/7e2ee9ce86e945908ac3746d27d0ed33.png
- Here is an example of what it does. Crobats (talk) 22:33, 11 August 2016 (UTC)
- See Help:Images. FriedhelmW (talk) 22:42, 11 August 2016 (UTC)
- I don't think I can find a solution there as it directly relates to how the FrontEnd extension works. I attached an example above, apologies if I'm not clear. Crobats (talk) 22:50, 11 August 2016 (UTC)
- Bump :(? Crobats (talk) 20:56, 31 August 2016 (UTC)
Class 'ResourceLoaderUserStylesModule' not found
[edit]RESOLVED | |
MobileFrontend and MediaWiki core had incompatible releases. Use origin/REL1_27 |
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.
After updating to Mediawiki 1.27.1, I naively updated MobileFrontend from the Git master branch, but this produced the following error in the logs:
PHP Fatal error: Class 'ResourceLoaderUserStylesModule' not found in ../extensions/MobileFrontend/includes/modules/MobileUserStylesModule.php on line 11</pre> And indeed, ResourceLoaderUserStylesModule was nowhere to be found. It was only added on July 26 to the Mediawiki core (and is not part of Mediawiki 1.27) and then referenced in MobileFrontend the same day. So yeah, one shoud pay close attention to release numbers and not mindlessly update straight from the master branch as I did :-) After checking out origin/REL1_27, the error went away and MobileFrontend works fine again! -- Evilninja (talk) 22:21, 23 August 2016 (UTC) :Thanks for reporting this. I'm sure someone else will find this useful! <3 Jdlrobson (talk) 22:55, 23 August 2016 (UTC) :At April 2017 the error ist still there ... Thank you Evilninja for this issue Kap-Gallo (talk) 17:17, 11 April 2017 (UTC)The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.
Add image to menu
[edit]In which file in the directory 'extensions/MobileFrontend/' or in its subdirectories is it possible to add a bit of HTML to include a logo with a simple <img src=...> tag to appear just below the navigational topics? Yellowdog (talk) 22:39, 31 August 2016 (UTC) :Try editing "resources/mobile.mainMenu/menu.mustache" - that should do what you want. Jdlrobson (talk) 00:43, 1 September 2016 (UTC) :Thanks for the tip! That would otherwise have taken me forever to find :-) Yellowdog (talk) 05:14, 1 September 2016 (UTC) :I realised after modifying the file including a bit of Javascript, such as <script>document.write(document.title)</script> for example, makes the left menu and content page disappear and display the document.title only in any browser device. This must be because the menu already exists but is hidden but dynamically pulled out, using Javascript I guess. Obviously it's not possible to document.write to an already loaded document by executing document.write. So if I would like to use a bit of Javascript in writing out some HTML bits in the menu.mustache, I think the HTML object needs to be pre-written in Javascript as the page loads, but where? :Many thanks for any comments! :Tuxedo :Why the 'mustache' in the menu? Yellowdog (talk) 10:35, 1 September 2016 (UTC) :This is no meant for scripts If you want to add scripts you should add them inside MediaWiki:Mobile.js or MediaWiki:Minerva.js. Any other HTML should be fine in there. :If you want to change the structure of the menu you may also want to explore tweaking the value of mw.config.values.wgMinervaMenuData Jdlrobson (talk) 22:29, 1 September 2016 (UTC) :Thanks, I found Mobile.js works on the version of my installed MobileFrontend. :Also, does anyone here know if there's a way to add something in LocalSettings to appear in the footer part of Mobile views? Maybe a similar way to how skin modifications in the Desktop view exists: :
$wgHooks['SkinBuildSidebar'][] = 'fnNewSidebarItem';
function fnNewSidebarItem( $skin, &$bar ) {
$out = "here goes some text and <b>html</b> parts\n";
$out .= "and some more\n";
$bar[ 'hello' ] = $out;
return true;
}
Minerva media URL's incorrect?
[edit]RESOLVED | |
I believe this is the bug that was tracked in https://phabricator.wikimedia.org/T147738. You'll need to apply the fix. |
If I'm correct an image (or media) file ([[File:...]]) should convert to * /index.php?title=<pagetitle>#/media/File:<filename> Instead I get * /index.php?title=<pagetitle>#/media/index.php%3Ftitle%3DFile%3A<filename> Thus, when clicking the thumbnail, the full size image never loads. The progress wheel just spins and spins. http://foobazaar.com/wikpa/index.php?title=Issues:MobileImage&useskin=minerva - example on a brand new Mediawiki installation (1.27.1) and MobileFrontend 1.0.0 (717861c). With Minerva enabled, the image URL is incorrect, I think, and the image never loads into the media viewer. If I fix the URL it loads. The working URL matches the format that Wikipedia produces. Is this a bug? What piece/part is responsible for the URL substitution on media files? Meambobbo (talk) 02:23, 7 September 2016 (UTC) :Looks like you've discovered a bug. Would you open a ticket at https://phabricator.wikimedia.org/maniphest/task/edit/form/1/ and tag it with MobileFrontend? Bmansurov (WMF) (talk) 15:54, 5 October 2016 (UTC) :thanks, @Bmansurov (WMF), I have created a ticket here: https://phabricator.wikimedia.org/T147738 :If I get some time I may be able to help track it down. Do you know what part of the code is responsible for altering the URL's as such? Also, I'm going to try to turn on lazy loading for images. Currently, I don't have that turned on. Meambobbo (talk) 03:45, 9 October 2016 (UTC) :I can't recall, but it's probably related to some config variable. Let's continue the conversation in the task. Bmansurov (WMF) (talk) 17:13, 11 October 2016 (UTC) :Hi, :in my wiki the arrows of mobile dosen't work? :http://wiki.langa.tv/LANGA_PRINT :can you help me?! thanks 79.59.156.40 (talk) 18:06, 21 December 2016 (UTC) :the same applies for me :i can reproduce the issue :* First clear the browser history :* Than url twh4u.ddns.net (CR) :* Click on the large image :* Sign in as admin :* Click on the image of the guard :RESULT ... cbp/mwk/index.php?title=%E7%A4%BE%E5%8D%80%E4%BF%A1%E6%81%AF#/media/index.php%3Ftitle%3D%E6%AA%94%E6%A1%88%3AGuard1.jpg :the same weird #/media/index.php added :ps:i modified the source to get some extra menu's but whenever i clic on an image (without link ) this happens :
BUT.......
:Whenever i use with the mouse "open in new window" the image appears correctly !!!! 1.174.248.35 (talk) 13:42, 4 January 2017 (UTC)
:the mod in gerrit.wikimedia.org/r/#/c/328234/2..5/resources/mobile.startup/Page.js
:works for me ^_^
:MediaWiki 1.28.0
:PHP 5.5.38 (fpm-fcgi)
:MariaDB 5.5.51-MariaDB
:MobileFrontend 1.0.0 (a0c8024) 2016年10月26日 (三) 05:14 1.174.248.35 (talk) 14:00, 4 January 2017 (UTC)
:79.59.156.40, you have JS error in some of your files. You can see the list by opening the browser console while visiting http://wiki.langa.tv/index.php?title=LANGA_PRINT&mobileaction=toggle_view_mobile&debug=true Bmansurov (WMF) (talk) 23:42, 7 April 2017 (UTC)
ZWJ problem on Firefox for mobile
[edit]https://bugzilla.mozilla.org/show_bug.cgi?id=490534 To avoid this bug affect mobile pages, this extension should give some special treatments on these chacters to let them display with the same font. ZWNJ should also be treated, since both these three characters are often used in complex scripts. Great Brightstar (talk) 16:18, 8 October 2016 (UTC) :I know what's wrong with that, I have disabled web font unintentionally when I found this problem, but when I enabled web font, this problem disappeared. Great Brightstar (talk) 10:09, 9 October 2016 (UTC)
Bullet not align with bulleted text when Firefox for mobile enabled WebKit compatibility
[edit]RESOLVED | |
Tracked in https://phabricator.wikimedia.org/T153199. |
On this article, I found some bullets is not align with bulleted text when I enabled WebKit compatibility on Firefox for mobile. Great Brightstar (talk) 16:57, 8 October 2016 (UTC) :To make Firefox for mobile compatible with WebKit, first, you need to open about:config page, second, find an option called layout.css.prefixes.webkit, finally turn the value to true. Great Brightstar (talk) 17:04, 8 October 2016 (UTC) :Thanks for reporting, the bug has been captured in https://phabricator.wikimedia.org/T153199. Please subscribe there if you're interested in it's development. Bmansurov (WMF) (talk) 13:45, 14 December 2016 (UTC)
Add more site navigation items to mobile menu
[edit]RESOLVED | |
This is tracked in https://phabricator.wikimedia.org/T65459 |
I guess this might have been asked before but I couldn't find the answer to this issue. Currently on my wiki's mobile menu I see Home, Random, Watchlist, Settings and Log in menu items. But I would like modify these items as per my needs. I see that this wiki's mobile site has 4 items which are same as above but without Watchlist. And the wiki here shows too many items on the mobile menu. So I see it is possible to customize and would appreciate any pointers regarding the same. 49.207.59.221 (talk) 13:39, 27 October 2016 (UTC)
MinervaTemplate.php (1.27) no longer accepting ads
[edit]Hello. I have downloaded, through git, the 1.27 branch of MobileFrontend. I used to have an older version (downloaded around May, last year - 1.25). In that older version, placing an ad code, inside MinervaTemplate.php, inside the following lines: protected function renderFooter( $data ) { } and inside if ( $internalBanner || $preBodyText ) { } made ads work on the wiki (top and bottom ads). Things have changed, a bit, in the 1.27 version, thus there are more lines between protected function renderFooter( $data ) { and } and the code has to be placed between return $footer; ?> and <div id="footer"> (bottom ad). For the top ad: between return $data[ 'bodytext' ]; ?> and <div class="pre-content">. Yet the ads won't load, no matter what. Has something changed to the skin that doesn't allow ads anymore. The ad code itself cannot be at fault, as I added the same ad codes (and even more) inside the 1.27 version of MonoBook and Vector. Do the ads have to be added inside another file? Please guide me in the right place. 188.24.66.168 (talk) 19:34, 31 October 2016 (UTC) :Yes, the footer has changed. If you want to display additional data in the footer, you need to create a div with the `post-content footer-content` classes and insert it after `.last-modified-bar`. Bmansurov (WMF) (talk) 13:37, 14 December 2016 (UTC) :Hey. Thanks for the reply. And how about the header? 92.83.216.199 (talk) 15:11, 25 December 2016 (UTC) :Hey. There is no "last-modified-bar" in the MinervaTemplate.php. I switched to MW 1.28 since then. Was its location changed or do I need to look for something else? 92.83.216.199 (talk) 16:49, 3 January 2017 (UTC) :As for the header, there is no space in the header for displaying additional content. :The last modified bar HTML has moved to /includes/skins/history.mustache. Bmansurov (WMF) (talk) 23:44, 7 April 2017 (UTC) :Thank you for the reply, but I am afraid I can't get it to work. Please bear with me as I describe what I did. I opened that file as you told me to, then, after the last line
:<div class="{{^isMainPage}}last-modified-bar{{/isMainPage}} view-border-box post-content">
: <div id="mw-mf-last-modified" class="truncated-text">
: <a href="{{link}}"
: data-user-name="{{username}}"
: data-user-gender="{{userGender}}"
: data-timestamp="{{timestamp}}">
: {{text}}
: </a>
: </div>
:</div>,
:I added :<div class="post-content footer-content">
:<div class="ad"> :then added the code for the add, then closed it with :</div>
:</div> :but nothing would display at the bottom (aka the footer). What am I doing wrong? │Star-Warden│ 14:31, 8 April 2017 (UTC) :It might be caching related. Update the version number in /includes/skins/minerva.mustache as well and ensure you purge the page. :()=> Jdlrobson (talk) 18:17, 8 April 2017 (UTC) :Nope. I've just redownloaded the entire extension through git (REL 1_28) and even purged the page. Isn't there any other file, aside from history.mustache, that I need to edit? Or maybe I am adding the wrong code? │Star-Warden│ 19:43, 8 April 2017 (UTC) :did you change the content of minerva.mustache as well? Jdlrobson (talk) 21:58, 8 April 2017 (UTC) :So it seems that ads do appear, but somehow they're awkwardly shown in the middle of the main page, covering a bit of content, that's why I overlooked them, as I always scrolled to the bottom... I've disabled the ads in both mustaches, but they still appear. Is there a way to move them to the bottom rather? :EDIT: Actually, they still appeared because, somehow, putting them between /* */ didn't disable them, for some reason, so I just removed the lines altogether. The ads no longer appear. Still, what you told me does make the code work, but I would like to know if it's possible to send them to the bottom bottom, rather than the middle. │Star-Warden│ 22:25, 8 April 2017 (UTC) :Look at style rules that are causing the issue. Your immediate issue seems to be resolved. In the future would you create a task on Phabricator [1]? Bmansurov (WMF) (talk) 13:55, 10 April 2017 (UTC) :@Star Warden sounds like you need to add some CSS/HTML. All the HTML markup is in minerva.mustache so please feel free to explore where to place ypur banners to get the desired result. :@Bmansurov (WMF) I'm not sure Phabricator is relevant here as this is about troubleshooting not a bug report. Jdlrobson (talk) 19:48, 11 April 2017 (UTC) :Thank you, I will try that. │Star-Warden│ 19:51, 11 April 2017 (UTC)
The title of content can't dispaly correctly on mobile chrome
[edit]I have install the mobilefrontend correctly,and it's useful. But the title can not display between the <span class="mw-headline">title</span>, it display like" <span class="mw-headline"></span>title". This link is my website,you can see the mobile view's title cannot display rightly. http://www.ourspark.space/wiki/index.php?title=MCookie%E5%85%A5%E9%97%A8&mobileaction=toggle_view_mobile who can help me to make it display well? Thanks! Yelvti (talk) 06:35, 1 December 2016 (UTC) :It has probably something to do with the `b` tag after the `span` on your site. Try getting rid of the triple `'s from the titles. For example change ===学习目标=== to ===学习目标===. That said, I don't see why that should be a problem, it's valid to have inline elements inside other inline elements. Maybe you have some setting that's causing this? Bmansurov (WMF) (talk) 13:33, 14 December 2016 (UTC)
The WikiEditor not displayed?
[edit]RESOLVED | |
Tracked in https://phabricator.wikimedia.org/T162708 |
I have a problem with with the MobileFronted, the WikiEditor will not be displayed.? The WikiEditor is displayed on the Vector skin without problems 93.215.27.220 (talk) 15:13, 6 December 2016 (UTC) :Can you share more info about the nature of the problem? Are you getting an error? What are your related configuration settings? Bmansurov (WMF) (talk) 13:25, 14 December 2016 (UTC) :Looks like I am also having this problem on a private wiki. CentOS 5.11 x86_64, php-5.6.29-1.el5.remi, nginx-1.10.2-1.el5.ngx, php-fpm-5.6.29-1.el5.remi, MediaWiki 1.28, MobileFrontend 1.0.0 (4544cea) 2016-12-19T23:46:49. For uses it looks like an empty page is being loaded when they press an Edit button at any page. What can I do to help you to fix it? Serhii Laskavyi (talk) 19:08, 20 December 2016 (UTC) :Sometimes an empty Edit page has a message «Ожидание ru.wikipedia.org…» (Loading ru.wikipedia.org) in a status bar. Serhii Laskavyi (talk) 19:12, 20 December 2016 (UTC) :Software to reproduce problem: Microsoft Windows 7, Google Chrome 52.0.2743.116 (Розробка) m (64-розрядна версія) Редакція 9115ecad1cae66fd5fe52bd9120af643384fd6f3-refs/branch-heads/2743@{#728}. Serhii Laskavyi (talk) 09:39, 21 December 2016 (UTC) ::For my case commenting out everything in http://wiki.intranet/MediaWiki:Common.js resolved my problem. Serhii Laskavyi (talk) 10:08, 28 December 2016 (UTC) :Me too I have the same problem, when I click on pencil to modify a section of a page it doesn't run...(reindirizzamento all'editor...) :you can try on wiki.langa.tv :Thanks 79.59.156.40 (talk) 10:12, 22 December 2016 (UTC) :@Serhii Laskavyi try opening the browser console and seeing if you have any errors there. Bmansurov (WMF) (talk) 23:45, 7 April 2017 (UTC) :I have same problem. Could not edit at mobile page. I'm using mediawiki 1.28.0, php 5.6.28, Mysql 5.6.34 MobileFrontend 1.0.0(2016-10-26) :Browser console, show me errors. :"Fatal exception of type http://mywiki.url/load.php?debug=false&lang=ko&modules=mobile.search%7Cskins.minerva.editor%2Cscripts%2Ctalk%2Ctoggling%2Cwatchstar&skin=minerva&version=1nb1sor :What should I check? :Thanks. 118.131.216.180 (talk) 06:11, 18 April 2017 (UTC) ::my private wiki does not have ssl. Is this have something with edit issue? Naramoksu (talk) 03:03, 19 April 2017 (UTC) ::I tested and found edit issue have nothing to do with SSL. Naramoksu (talk) 10:06, 19 April 2017 (UTC) :Add `?debug` to the URL and find the ResourceLoader module that is causing the issue. Bmansurov (WMF) (talk) 17:50, 20 April 2017 (UTC) :WikiEditor is not compatible with MobileFrontend :/. :This is tracked in https://phabricator.wikimedia.org/T162708 Jdlrobson (talk) 21:48, 20 April 2017 (UTC)
Javascript Functions on MobileSkin not working
[edit]RESOLVED | |
Dynamic Navigation Bars is not compatible with MobileFrontend at the current time. |
The Toggler Function toggler(id) and the addOnloadHook(toggleInit) Function for Dynamic Navigation Bars is not working on the MobileFronted. I have added the javascript codes to the mobile.js file, but they are not loaded. On the Vector skin these functions work without problems. Can anyone help? 93.201.79.237 (talk) 16:07, 11 December 2016 (UTC) :Please contact the developer for "Dynamic Navigation Bars" and point them to this: https://www.mediawiki.org/wiki/ResourceLoader/Writing_a_MobileFrontend_friendly_ResourceLoader_module Jdlrobson (talk) 04:06, 12 December 2016 (UTC)
Fatal exception of type "BadMethodCallException"
[edit] I was using wiki 1.19 on until few weeks ago and when I was forced to update the OS it came with updates to the php version ( now to 5.5.14 ) and mysql 5.6.34.
:Then I had also to upgrade mediawiki as it wouldn't recognize anymore a lots of things. Updated to 1.28. The data seems consistent following the upgrade , but I cannot login .
:I am getting error like this in the browser:
:[3d51f58fd07586b443e96d0d] 2017-01-24 09:30:42: Fatal exception of type "BadMethodCallException"
:There was no error in the apache error log file, however I have found a hint by right-clicking in the browser ( Chromium) and chosing "Inspect Element". In the html code around the error there's a note asking you to go in LocalSettings.php and write "$wgShowExceptionDetails = true;".
:This gives you more info about this error. For me it was about the fact that I am not using SSL over login .
:"You really should install the PHP OpenSSL extension, or failing that the mcrypt extension. But if you really can't and you're willing to accept insecure storage of sensitive session data, set $wgSessionInsecureSecrets = true in LocalSettings.php to make this exception go away."
:Cheers!
:Cat 88.98.174.218 (talk) 10:00, 24 January 2017 (UTC)