Can anyone save me some time and tell me what part of Mobile Tools is either preventing a views object from loading or declaring a null value conflicting with views. The relevant part of views is this:

* Attach all of the handlers for each type.
* @param $key
* One of 'argument', 'field', 'sort', 'filter', 'relationship'
* @param $info
* The $info from views_object_types for this object.
function _init_handler($key, $info) {

// Load the requested items from the display onto the object.
$this->$key = $this->display_handler->get_handlers($key);

Line 539 is the last line.

The error occurs when I try to load the mobile version, I am detecting mobile devices using WURLF and changing theme based on url. Disabling views resolves the problem, but this is not really an option.

Thanks a lot



I have isolated the problem to line 705 of mobile_tools.module:


I'm assuming that views is still trying to load after this call and thus triggering the error. I have commented out the line with no obvious repercussions for the site, but if anyone can tell me why it needs to be there please let me know.

Thanks a lot


Priority:Normal» Critical

I am getting the same error. When I enable the redirection, the desktop site gives me a white screen with the error above. Uncommenting the line as mentioned in comment #1 makes the error go away but redirects all users to the mobile site. Accessing the desktop site through its normal URL is impossible.

Since this breaks the module and the whole site, I mark it as critical.

Hello Yan,

I'm using a sub-domain for the mobile site so the separation allows me to keep the desktop site after commenting out the line. It's worked for me so I have not looked any further at a solution, but I'll take another look.


Hi Ian, me too! I'm using as the mobile site with a different theme. But the redirect still doesn't work. Any help is appreciated. Best, yan

Ok, there seem to be two problems in my case:

  1. Redirection doesn't work if bootstrap_invoke_all('exit'); is not uncommented.
  2. Redirection doesn't work with browsecap, which throws this error message:

Warning: Wrong parameter count for in_array() in /sites/all/modules/mobile_tools/modules/mt_browscap/mt_browscap.module on line 32

With 1) commented out and 2) without browsecap, the redirection seems to work now.

PS: I won't be able to give feedback in the next two weeks.