Every page. Every device.

Fatal error: Call to undefined function drupal_get_path_alias() in .../mobile_tools/mobile_tools.module on line 285

How can nobody else have this? I haven't even set up anything. I installed it and this happened. Flushing the cache doesn't help. (But it still works via drush.)

CommentFileSizeAuthor
#10 undefined_drupal_get_path.patch617 bytestruyenle

Comments

rudiedirkx’s picture

I removed all mobile_tools_* variables and then the site worked again.

And then I set up redirection and then it failed again.

Line 273+ of mobile_tools.module:

  if($mobile_url == $desktop_url){
    return;
  }

The missing drupal_get_path_alias is in that same function (mobile_tools_device_redirect), so I guess it's the redirection. =(

rudiedirkx’s picture

If I don't redirect and "Switch theme for a mobile device *", it at least works, but apparantly no caching with this method.

RachelIsland’s picture

I have the same issue here. I can't make this module work at all... :(

davidpinard’s picture

I have the same issue here too..

rudiedirkx’s picture

But apparently nobody cares :(

jmomandown’s picture

Status: Active » Fixed

The answer to this is fairly simple (I remember seeing it a while back but cannot find the thread now).

Line 284: drupal_bootstrap(DRUPAL_BOOTSTRAP_PATH);

should be changed to

drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

There is no BOOTSTRAP_PATH, this is why the error is thrown. change that 4 letter word and it will work perfectly

rudiedirkx’s picture

Is it fixed though? In which release? If It's still wrong in the code, It's still a bug and us not fixed.

jmomandown’s picture

Status: Fixed » Needs work

yes sorry. I was very tired and wasn't thinking. No it is not fixed per the downloadable modules. However, this solves it until the code is updated

devin carlson’s picture

Version: 7.x-2.0-unstable1 » 7.x-2.x-dev
Priority: Critical » Normal
Status: Needs work » Closed (fixed)

I can't find any reference to drupal_bootstrap() in the latest checkout of Mobile Tools 7.x-2.x.

Please note that the 7.x-2.x branch of Mobile Tools in unsupported.

truyenle’s picture

StatusFileSize
new617 bytes

#6 work for me. Here is the patch.