I'm currently trying to develop a web app that is to be used by mobile devices, but not be accessible easily from other user agents. Therefore I've enabled the mobile user roles so that anonymous users can't access the content while anonymous mobile users can.

I've also enabled theme switching depending on device so that mobile devices gets one theme and other visitors another.

This is causing some unexpected behavior though as it seems mobile tools can't really decide what to make of devices.

When browsing with my Iphone 3G it's working as expected, correct theme used and content accessed.
When browsing with an Iphone 3Gs the correct theme is used, but content can't be accessed (that is, the mobile user role isn't used)
The same when I'm letting Firefox mimick Iphone 3.0 (or other mobile device) with User Agent Switcher.

I've tried enabling Browscap for device detection, but then the theme switching stopped working (and mobile roles still weren't used) so that seems like a dead end.

Am I misunderstanding something about how the mobile user roles are supposed to work or is there something fishy about all this? Have any of you encountered the same or similar problems before?

Comments

jdwfly’s picture

I think I can confirm what is said here. It seems as though the Mobile Roles are not getting added.

My situation is a little bit different, but essentially I am using the front module to have a different front page for mobile but when I use Firefox and User Agent Switcher I am still getting the desktop front page.

jdwfly’s picture

Version: 6.x-1.12 » 6.x-1.x-dev
Component: Miscellaneous » Code

I just tried out dev and it doesn't seem to be working either. Going to move it up to dev and try to see what's going on.

jdwfly’s picture

Version: 6.x-1.x-dev » 6.x-1.12

I take back what I previously mentioned. It does assign the role to the user, so there must be an issue somewhere else. I'll put this back to the original version because it looks like dev does assign the role to the user for mobile.

cswan’s picture

Title: Theme Switch and Mobile Roles irregularities » Mobile Tools' role switching
Version: 6.x-1.12 » 6.x-1.x-dev
Component: Code » Miscellaneous

Hi,

I'm also using Mobile Tools together with Front Page module to have a different front page for mobile site by taking advantage of role switching. I'm using dev version of Mobile Tools.

At first, Front page module didn't work in the way I expected. I needed to add php code in "Front Page for anonymous user" in /admin/settings/front page.

Now, Front module is working fine. However, I think Mobile Tools' role switching is not working properly. I get mobile role when I sign-in from mobile device. This is working great. However, after that, when I sign-in from desktop site, I still get the mobile role and it doesn't go back to the original role.

How can I make it, so, it will go back to the original role when I sign-in from desktop site after I access the site from mobile device?

Thank you very much

twom’s picture

Status: Active » Needs review

The Mobile Tools roles functionality is rewritten. I hope you find the time to test out the new dev version of the module.

minoroffense’s picture

Status: Needs review » Closed (fixed)

Assuming the issue is fixed.