Closed (works as designed)
Project:
Mobile Tools
Version:
6.x-2.3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jun 2011 at 20:16 UTC
Updated:
17 Mar 2012 at 08:27 UTC
In 6.x-2.3, I created a context that applies to desktop only, but the context was firing for both desktop and iPhone.
I may be misunderstanding something, but in 6.x-2.3 the context plugin looks like it is lacking code to actually check that the current browser device type matches what was selected in the context. The attached patch adds an if statement to make sure the selected device type for the context is active.
| Comment | File | Size | Author |
|---|---|---|---|
| context-check-device-type.txt | 641 bytes | justin2pin |
Comments
Comment #1
justin2pin commentedMy mistake - I misunderstood the context plugin implementation. Looks like it works as designed. Sorry for the confusion...
Comment #2
loze commentedFor D6 I ran into problems getting a context to trigger for mobile devices.
I had to make a small change to mobile_tools_init()
It appears that the check for the condition is going in the wrong direction.
at line 219 changing if(!$plugin){ to if($plugin){ makes the context trigger correctly for me.