I've found that on the mobile site there are some pages which present using the normal desktop theme rather than the mobile theme. I haven't been able to draw a pattern yet, most pages display correctly, but some do not.

In this particular install, I'm using the recommended "m" subdomain for the mobile site, with theme switching based on URL. I've disabled cacheing in the performance settings just in case that was causing the problem, but apparently that is not the issue. I've tested the dev version on a mirror of the site, and had the same problems.

Hopefully someone out there has some insight or suggestions! Thanks.

Comments

thi3rry’s picture

I've a similar issue.
The mobile template isn't used on all mobile site nodes page, since I have installed and actived the menu_breadcrumb module.

The only way I've found is to disabling menu_breadcrumb module.

I also use the recommended "m" subdomain for the mobile site.

I should it will help you...

thi3rry’s picture

I found one solution : set the system weight module of mobile_tools to be lower to the system weight module of menu_breadcrumb (which is 0).
UPDATE system SET weight = '-1' WHERE name = 'mobile_tools'

Maybe the problem should be solved by modifying the weight of menu_breadcrumb.

To be more clear, mobile_tools must execute its hook_init() before menu_breadcrumb.
But I don't know if it affects other features of mobile_tools.

ryrye’s picture

Unfortunately, I've found an alternate way to handle the theme switching, so I can't confirm that this fixes it for me. However, before you posted this, I had a hunch that the problem was related to breadcrumbs, and I am using menu_breadcrumb module. I believe that your solution would have fixed it for me. Thanks thi3rry, I think this will help someone else too.

ryrye’s picture

Status: Active » Fixed
thi3rry’s picture

Could you tell me what is your alternate way ? Because my solution solve my problem but unfortunately menu_breadcrumb does not work anymore.

ryrye’s picture

The main thing I'm doing is using Domain Access to switch themes based on url. Domain Access has been very solid for theme switching. However, to have the other features of Mobile Tools, I've had to reproduce with custom code: redirecting mobile users to the mobile site (using browscap to detect mobile users) and then setting cookies for when mobile users want to override the redirect ("view as desktop").

colinmccabe’s picture

Status: Fixed » Active

I'm having the same problem. On some computers, URL theme switching works perfectly. Being logged in as the admin seems to help for some reason. On other computers I get booted out of the desired theme randomly.

Disabling Themekey does not help. All link URLs on the site are relative, so the domain (m.mysite.com) is always correct.

ohnobinki’s picture

Version: 6.x-2.2 » 6.x-2.3

Perhaps the theme switching could be done earlier? I think that it has been moved to hook_boot() in 6.x-2.x, but it's still in hook_init() for 6.x-2.3.

thi3rry’s picture

@ragamuffinman : yes I have the same on one project.

Desktop site is shown on the mobile subdomain except if I'm logged as admin.

Mobile tools configuration :

  • redirection options are disabled
  • theme switching is based on mobile/desktop url

Maybe it's a configuration issue because it works on my development environment but not on production. (if only it was the opposite!)

nilofar123’s picture

i have same issue
1] when i switch from my desktop site to mobile site it detect device properly but theme not switch,

2] and some time theme switch but some pages of desktop site shows mobile site pages on desktop .

3] images of desktop site becomes small (180x180) because it takes path of mobileplugin
i am using " Switch theme for a mobile device * " for switching theme i am very worried about that,
please somebody help me .

windm’s picture

Hi all,

any progress on this in terms of a patch or a simple "how to change"...?

It seems to be not that complicated - theme switching is not working properly as long as I have "Use the menu structure to set the breadcrumb trail" activated in the Custom Breadcrumbs Configuration.
Switching only that feature off (not even the entire custom_breadcrumb module), the theme switching works for all pages... So the bug or issue is obviously related how Breadcrumb Module and Mobile Tools interact...

Changing the weight (#2) or order of the modules sounds promising and should help.
Nevertheless I´m not sure where to change settings or (referring to #8) move some code ("...moved to hook_boot() in 6.x-2.x, but it's still in hook_init()...").

Any advice?

devin carlson’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.