Postponed (maintainer needs more info)
Project:
Mobile Tools
Version:
6.x-2.3
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
11 Oct 2010 at 15:10 UTC
Updated:
29 Nov 2012 at 09:35 UTC
I've activated the Anonymous user (mobile) role, but apparently it doesn't get used if I access the page from a mobile phone. Instead, the permissions of a regular anonymous user are applied.
That's probably tied to this error that gets thrown when I want to activate the Anonymous user (mobile) role:
Call to undefined function db_last_insert_id() in /var/www/drupal/modules/mobile_tools/mobile_tools.module on line 973, referer: http://server.com/drupal/?q=en/admin/settings/mobile-tools/roles
PHP version is 5.2.10
Ist there a way to either fix this or use another way to display a customized front page for users of the mobile theme?
Comments
Comment #1
znero commentedComment #2
znero commentedI just wanted to mention again that I still experience that error. Any idea on how to fix it?
Comment #3
chris.toler commentedI'm having this issue with 6.x-1.9, without the error mentioned above. Activating the anonymous role seems to work, and I attempt to remove "node access" as a permission for it, but the mobile site continues to use the normal anonymous permissions.
Comment #4
jarchowk commentedTake a look at your mobile_tools_roles.inc .. in the _boot and _user function there is a condition that looks like:
and
respectively. I replaced both with:
and the roles seem to be switching fine now. I am guessing those session vars were deprecated and the roles include wasn't updated? Please let me know if you can see any problems with this fix.
Comment #5
twom commentedThx for the fix. In meantime I gave the mobile roles code a good update that should fix a number of errors.
It is ready to review in the dev version.
Comment #6
rlustemberg commentedI've created 2 views with access restrictions based on the mobile and normal roles. One view displays content in a grid of 2 elements, the other in a grid of 4.
I've tried the latest dev version and I found it applies permissions from the 'anonymous' role to the 'anonymous (Mobile)' role. It has no problems telling between authenticated and 'authenticated (Mobile).
I am in a hurry now, so I'll use a workaround of setting up a new menu with different items specifically for the Mobile theme, using theming hacks, but later this week I'll have a closer look to see what is happening.
Comment #7
minoroffense commentedHas this been fixed in a newer release?
Comment #8
akosipax commentedI have the same problem too. I have 2 views with the same path, one can be accessed by anonymous and the other by anonymous (mobile). When I check the page in a mobile phone, the view which is for (regular) anonymous users show. The view for anonymous (mobile) isn't applied.
I temporarily changed the first view to authenticated just to check if views isn't the problem. It worked. When I go to my desktop page as anonymous, I can't access it. And when I go to the same page using my mobile phone, I now see the view for anonymous (mobile).
It seems like whatever is applied to the anonymous role, is also applied to anonymous (mobile)!
Comment #9
minoroffense commentedJust to clarify, is this issue with 6.x-1.9 or is it an old ticket?
If it is with 1.9, can you check if the bug exists in 2.x as well?
Thanks
Comment #10
akosipax commentedYes, it exists in 6.x-2.3. That's the version I use.
Comment #11
alfthecat commentedhave this problem too, but the solution from #4 can't be applied to version 2.x (dev) as the file mobile_tools_roles.inc does no longer exist. I can't find the referenced code anywhere.
My problem is that for some reason, mobile users are only partly detected. I tried excluding certain content types through the content_access module by restricting them to non-mobile roles. That doesn't work, although in the forum_access module, it does work.
Rules based on mobile roles won't trigger. But in Panles, I can issue redirects based on device detection.
This has me severely puzzled....