Seems to be the same issue as with the 6.x version of the module. The 'ismobiledevice' value in the browscap array is a string value of 'true' or 'false' rather than a boolean so it's always true. I changed line 141 of mobile_theme.module to:
return $browser['ismobiledevice']=='true';

PHP version: 5.3.15
Browscap module version: 7.x-2.0

CommentFileSizeAuthor
#2 1906014.patch948 bytesrobloach

Comments

pglynn’s picture

This issue occurs in mobile_theme.module version 7.x-1.2 as well. I changed line 162 of mobile_theme.module to match the above and the problem went away. The mobile theme was sending all browsers to the mobile site.

robloach’s picture

Status: Active » Needs review
StatusFileSize
new948 bytes
robloach’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
jarodms’s picture

I was seeing the same problem. patch in #2 works for me.

jarodms’s picture

Issue summary: View changes

Made a mistake with the filename, renamed mobile_theme.api.php to mobile_theme.module

balakumarjayapal’s picture

For Drupal 6

Solved my issue by changing line 101 in mobile_theme.module

return $browser['ismobiledevice']=='true';

MakeOnlineShop’s picture

Issue summary: View changes

Thank you for Drupal 6 help above.

spidersilk’s picture

Applying this patch did indeed stop desktop devices from displaying the mobile theme. Unfortunately it also caused mobile devices to start displaying the desktop theme instead!

Has anyone else encountered this? Is there any solution? (Caching is not enabled, so it's not that)

This is the third mobile-switching module that I've tried, and I'm getting really frustrated. It doesn't seem like there's ANY workable solution for making a Drupal site switch to a mobile theme....

robloach’s picture

Status: Needs review » Fixed

Committed to 7.x-1.x

  • RobLoach committed 5ba57c6 on 7.x-1.x
    Issue #1906014 by RobLoach: Always using mobile theme when detection...

Status: Fixed » Closed (fixed)

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