I was trying to get this module to work when out of the blue I started getting the following error:

Notice: Undefined index: host in _mobile_tools_site_detection() (line 470 of /var/www/modules/mobile_tools/mobile_tools.module).
Notice: Undefined index: host in _mobile_tools_site_detection() (line 473 of /var/www/modules/mobile_tools/mobile_tools.module).

I can't for the life of me figure out how I caused it. If I remove the module and reinstall it, it just comes back. Flushed caches, run cron, rebuilt permissions, rebooted the server etc etc, can't figure out whats going on. I also can't access the modules config page anymore, it just sends me to the main page.

I'm not 100% certain that the problem is with this module, I've seen undefined index errors before, but never been able to trace the cause down. Its really starting to erk me!

Comments

nidhijsen’s picture

I think you didn't enter any value for 'Mobile URL' or 'Desktop URL' input field in Mobile tools configuration page.

brianmercer’s picture

I was having this same issue on 6.x-2.3 and php 5.3.5 and I found the solution.

The description says:

Give the name of your mobile site. It is recommended to use the convention of m.domain .com or www.domain.mobi

which suggests that the value should be inputted as "www.example.com" but the input really needs to be "http://www.example.com". Without the scheme, parse_url returns array([path] = "www.example.com") and no [host].

I haven't checked, but this may be a php 5.3.5 issue.

The field description should be edited to state that the field should be in the form "http://www.example.com"

nidhijsen’s picture

Status: Active » Closed (fixed)
Web Design Northern Ireland’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
StatusFileSize
new216.57 KB
new213.54 KB
new181.63 KB

Hi,

I'm getting the same error (see the screenshots) but can't see where the 'Mobile URL' or 'Desktop URL' input fields are. I've attached some screenshots of my settings but these fields do not seem to be there.

Any help appreciated.

gorka’s picture

Same error here
Notice: Undefined index: parent en _mobile_tools_browscap_match_parent() (línea 166 de .../sites/all/modules/mobile_tools/mobile_tools_browscap/mobile_tools_browscap.module).