When you are using a custom module for device detection which makes use of hook_is_mobile_device this doesn't work because the hook could not be invoked in mobile_tools_boot. This can be fixed if you add "mobile_tools_load_modules()" before you call mobile_tools_is_mobile_device:

function mobile_tools_boot() {
  global $conf, $user, $base_url;
  mobile_tools_load_modules();
  $_SESSION['mobile-tools-mobile-device'] = mobile_tools_is_mobile_device();
  $_SESSION['mobile-tools-site-type'] = mobile_tools_is_mobile_site();
  ...

Comments

twom’s picture

Status: Active » Fixed

This could mean a performance loss of your site....

Instead I use now the drupal_load('module', $modulename) function to be sure that the custom module is loaded.

I hope this will work for you.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.