Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
Template not used on mobile device
Avatar
suisse #1
Member for 3 months · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Template not used on mobile device
Hello

I have set up Dokuwiki with Bootstrap3 template. It all works fine on the computer. However, when accessing the wiki from my mobile device (Android), the Dokuwiki template is used instead. The same happens when testing it on the computer using the Developer Tools in Chrome.

I then installend the Loadskin extension. Now, when opening the page on my smartphone, I have a dropdown menu to choose a template. It defaults to Dokuwiki. When tapping on Bootstrap3, the page is automatically reloaded, but my choice is overridden and the page is shown in Dokuwiki style again.

Any help is greatly appreciated.
Avatar
suisse #2
Member for 3 months · 2 posts
Group memberships: Members
Show profile · Link to this post
Solved

I use the sectiontoggle plugin and the option `mobile_alt` was set to `dokuwiki`
Avatar
ach (Administrator) #3
Member since May 2006 · 1932 posts · Location: Folkestone, UK
Group memberships: Administrators, Members, Super Mods, Wiki Managers
Show profile · Link to this post
Quote by suisse:
I use the sectiontoggle plugin and the option `mobile_alt` was set to `dokuwiki`

That is so weird. In my opinion, the sectiontoggle plugin has no business having such an option as choosing a different template for mobile has nothing to do with toggling sections. :huh:
Avatar
turnermm (Moderator) #4
Member since Oct 2009 · 4702 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Dokuwiki is the fallback for templates that do not support mobile. Read the documentation. Obviously the OP did not.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
This post was edited on 2019-07-10, 03:11 by turnermm.
Avatar
aubreyb #5
Member since Feb 2017 · 17 posts
Group memberships: Members
Show profile · Link to this post
Not following that - surely the Bootstrap3 template "supports mobile" - that is the very point of (or at least a main point of) Bootsrap....
Avatar
turnermm (Moderator) #6
Member since Oct 2009 · 4702 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Quote by aubreyb:
Not following that - surely the Bootstrap3 template "supports mobile" - that is the very point of (or at least a main point of) Bootsrap....

The user has to indicate that in the Configuration Manager.  The plugin does not auto-detect whether a template supports mobile.  It's simply a matter of reading the documentation on the plugin page.  Which you should do for any plugin you use.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
This post was edited on 2019-07-17, 14:59 by turnermm.
Avatar
andi (Administrator) #7
User title: splitbrain
Member since May 2006 · 3474 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #3
Quote by ach on 2019-07-10, 01:07:
Quote by suisse:
I use the sectiontoggle plugin and the option `mobile_alt` was set to `dokuwiki`

That is so weird. In my opinion, the sectiontoggle plugin has no business having such an option as choosing a different template for mobile has nothing to do with toggling sections. :huh:

From what I understand from the plugin's page (without ever having tried it) I assume that the idea is to use the section toggles on mobile only. To decide if the user is using a mobile phone, the plugin sniffs the user agent header. It could stop there  but the plugin also tries to be clever and decides that it should not only make the sections togglable but also ensure a good overall mobile experience by switching the template to the default one (assuming that other templates provide a worse mobile experience). turnermm points out that this behaviour can be disabled.

Personally, I see two problems with this

  • as ach points out, switching the template seems to be out of scope for this plugin (and unexpected by users)
  • detecting mobile use via mobile browser is a bit archaic and may actually disagree with what the rest of the template does for mobile detection

Modern mobile detection does not care for the actual device at all, but uses media queries to determine the screen size/resolution. Ideally this plugin and the template should use exactly the same break points to provide a streamlined user experience. I haven't looked at the code - this might actually be very hard to implement. But I thought to add my two cents.
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
turnermm (Moderator) #8
Member since Oct 2009 · 4702 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Modern mobile detection does not care for the actual device at all, but uses media queries to determine the screen size/resolution. Ideally this plugin and the template should use exactly the same break points to provide a streamlined user experience. I haven't looked at the code - this might actually be very hard to implement. But I thought to add my two cents.

The plugin does in fact sniff out whether a mobile or tablet device is  being  used.  But when the plugin was written 6 years ago, there wasn't always a guarantee that every template supported the smaller sizes.  So the dokuwiki template was set as a default back-up in case the template did not support the smaller sizes but only if the user allowed it to be used.  Now maybe that was a mistake.  But I don't really see what the issue is about users reading the documentation where they would learn about this.  You can be sure that if I hadn't set a default, and the template didn't support mobile, I would have gotten the opposite complaint, and this was the first time in six years that this issue arose.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
turnermm (Moderator) #9
Member since Oct 2009 · 4702 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
In response to the issues raised here, I have updated the sectiontoggle plugin.  In resonse to @Ach, the reason for template switching was to give the user the option of switching to  a mobile-compatible, in particular a phone-compatible, template in the event that their current template did not support phones.  In order to make this update, I went through all of the templates from greebo through weatherwax and  binky compatibles, about 70, and there were approximately only 16 which support phones in a usable way.  Some of the more popular templates did not.

One of the shortcomings of the original version of the plugin is that the admin had to input a number of options in the Configuration Manager for the plugin to be able to identify the relevant headers for toggling.  This is why the dokuwiki template was set as the default: if the admin didn't bother to read the documentation, when the wiki was on a phone, the plugin would automatically work, since it knew how to set toggles on the dokuwiki template and didn't need any user configuration.

The upgrade does not require any user configuration. It can set toggles on any template and will work out of the box with any template.  While an alternate template for mobile can still be set by the admin, the option is left unset and the plugin will use the current template for mobile.   For possible optimal use admins can still set parameters for their templates, and in fact the plugin comes with an ini file that has settings for the 16 templates that function best with phones, with the option to add more.

These changes are for the better.  But that still doesn't mean that users shouldn't read the documentation.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
andi (Administrator) #10
User title: splitbrain
Member since May 2006 · 3474 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by turnermm on 2019-07-30, 15:09:
In order to make this update, I went through all of the templates from greebo through weatherwax and  binky compatibles, about 70, and there were approximately only 16 which support phones in a usable way.  Some of the more popular templates did not.

Wow this is super interesting! Would you mind opening a new thread with the results of your tests? Eg. what your criteria was and listing the 16 templates that matched your criteria and so on?
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
turnermm (Moderator) #11
Member since Oct 2009 · 4702 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
Will do.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
ach (Administrator) #12
Member since May 2006 · 1932 posts · Location: Folkestone, UK
Group memberships: Administrators, Members, Super Mods, Wiki Managers
Show profile · Link to this post
In reply to post #10
Quote by andi:
Eg. what your criteria was and listing the 16 templates that matched your criteria and so on?

That reminds me of my old template survey. I have a "responsive / mobile" column in that spreadsheet as well. It's too long ago but I think the way I determined it was simply by opening the syntax page, reducing the page width (so, no "true mobile") and manually checking how it looks.
Avatar
turnermm (Moderator) #13
Member since Oct 2009 · 4702 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
In reply to post #11
I have started a new thread for mobile-ready templates: https://forum.dokuwiki.org/thread/17154
It has a link to my survey of templates that work on phones.  As I reviewed my results I added a template, so the count now comes to 17.  The survey includes a page of screenshots taken on my phone.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-09-23, 15:44:39 (UTC +02:00)