I have set up Mobile Tools to switch the theme for mobile users. It works on my iPhone for every page except the home page. You can see it at http://www.opensourcetheology.net. The front page appears always to use the default theme for the site; all other pages use the mobile theme specified under the Mobile Theme tab. I have had similar behaviour using Switchtheme, so I guess it's something in the site's set up rather than a module problem, but I can't work out what it is.

Also I notice that the settings have provided http://m.opensourcetheology.net as the mobile URL. If I make this the same as the Desktop URL I get the following odd message along with the saved settings announcement at the top. It keeps recurring on other pages.

  • significant
  • welcome
  • significant
  • welcome
  • significant
  • welcome

Andrew

Comments

droopy’s picture

I've also found that the theme switching only works for logged in users, not at all for anonymous visitors to the site.

twom’s picture

Can you tell me if you are using the Frontpage module?

The messages you get are still some leftovers in the code for debugging. I'll commit a new version without the messages.

I see now that if you input the same url as desktop and mobile url, and you choose for redirect, or theme switching, you will probably only get the mobile version. I'll fix this too :)

droopy’s picture

Thanks for getting back to me. No, I don't use the frontpage module.

As far as I can tell, theme switching does not happen at all on the iPhone when I am not logged in.

When I am logged in, it works on every page except the frontpage.

Is there anything in settings.php or .htaccess that would affect this?

twom’s picture

Can you give me a list of module that you are using. At my test site everything works fine.

The way theme switching happens is in the mobile_tools_init() fucntion. When you are serving the mobile site I change the $conf['default_theme'] variable to the mobile theme.
If things are not working properly, this should be a conflict with another module rewriting this.

Since it works sometimes, device detection should be ok.

twom’s picture

Status: Active » Closed (fixed)

I'll close this for now, since no more info is available and no cases have been reported

shalompisteuo’s picture

I am having the same issue with mobile.autoremarketing.com. The internal pages work just fine but the homepage isn't working. We have been using this module for over a year and it has worked up until recently. The only thing that the homepage shows is a Page not found. Any advice on a possible fix?