Welcome, Guest
Username Password: Remember me

Template not switching to mobile_basic on desktop
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Template not switching to mobile_basic on desktop

Template not switching to mobile_basic on desktop 7 years, 4 months ago #20896

Hello everybody.
I have a website based on Joomla 2.5 and I installed mobile joomla.
I have enabled the mobile switcher in the footer, so that I can switch to mobile_basic template by clicking on "mobile" link.
The mobile link is built as <desktopurl>/?device=mobile. If I click on the mobile link, the switch to the mobile_basic template works only if I am in the home pages. In the other pages the template remains the desktop one, even if I see the "/?device=mobile" markup in the browser address bar. After playing around I found that, in the function onAfterRoute() in /plugins/system/mobilejoomla/mobilejoomla.php, the condition ($mjDevice->markup === false) is verified, and this causes the template not be set.

This condition is not verified when I'm in the home page.
How can I solve it? If somebody wants to help I can give you privately the website. Best regards Alberto
Last Edit: 7 years, 4 months ago by albertoamori.

Re: Template not switching to mobile_basic on desktop 7 years, 4 months ago #20898

@albertoamori ,

Can you provide us the URL on your site so that we can try to replicate the issue?

Best,

John Mark C.
Mobile Joomla! Support

Re: Template not switching to mobile_basic on desktop 7 years, 4 months ago #20899

Hi, the website is buylocalnumbers.com.
Notice that I have disabled the mobile switcher, so to reproduce the issue you have to add ?device=mobile to the URL in the browser address bar

****
Edit: for your convenience I have enabled the mobile switcher. You can find it in the website footer.
****
Edit: I have solved the issue doing a backup restore of the files of the website. Unfortunately I wasn't able to identify the root cause of the issue. If I discover it, I will publish it in this forum, so that other people avoid to fall in the same issue. I apologize for the inconvenient and I thank you for the attention you have dedicated to this issue.
Last Edit: 7 years, 4 months ago by albertoamori. Reason: Problem solved

Re: Template not switching to mobile_basic on desktop 7 years, 4 months ago #20901

@albertoamori

I tried to replicate the issue but I cannot see the problem. I tried the mobile switcher and went to other page and it remains on mobile. Please see video: www.screencast.com/t/IyXTCaCs9c

Can you also send a screenshot or video from your end please?

Re: Template not switching to mobile_basic on desktop 7 years, 4 months ago #20903

Hi,
you cannot reproduce the problem because, as I wrote in the edit of my last post, I solved the problem restoring the backup of my website of some days ago.
Making a folder comparison of the "bad" and "new" website version, I found that the reason of the issue was the presence of these instructions in the .htaccess:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]


I had added them to cut the index.php at the end of the urls, because this was creating some routing errors in special circumstances, but in this way I have basically broken my website. I have learnt the lesson, that I need to make a non-regression test list at every change.

Sorry for the time I had made you spent on this topic. I hope that learning from my mistake can be useful to other developers.
  • Page:
  • 1
Time to create page: 0.12 seconds

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.