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.

CommentFileSizeAuthor
context-check-device-type.txt641 bytesjustin2pin

Comments

justin2pin’s picture

Status: Needs review » Closed (works as designed)

My mistake - I misunderstood the context plugin implementation. Looks like it works as designed. Sorry for the confusion...

loze’s picture

For 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.