When you insert a redirect exception and save the page, and an error comes up.
Any ideas on how to fix this?

CommentFileSizeAuthor
#6 redirect_exceptions-1193668-6.patch1.34 KBgrndlvl

Comments

tjferre’s picture

Here is the fatal error message I get.
Fatal error: Call to undefined function drupal_get_path_alias() in /home/smartd5/public_html/modules/mobile_tools/mobile_tools.module on line 284

Here is line 284: $path = drupal_get_path_alias($_GET['q']);

Thanks in advance for any help.

tjferre’s picture

Is there any way of adding in redirect exceptions?

Thanks,
Trevor

davidphilip’s picture

I'm currently experiencing the same problem described above. It breaks the whole system, either did deleting corresponding db-entries help nor did deactivating the module. A solution to this would be highly appreciated!

tjferre’s picture

If I am not sure if you were trying to create redirect exceptions for the mobile site like I was so that when a desktop user went to the mobile site they could actually get there with out errors. If you were I have developed a work around that seems to be working for me.

/modules/mobile_tools/mobile_tools.module

Comment this code out in the in module file above. (Lines 303 to 306)

/**elseif ($device['type'] == 'desktop' && $current_url_type == 'mobile') {
$destination_url = mobile_tools_get_redirect_url('desktop');
mobile_tools_goto($destination_url);
}*/

tjferre’s picture

I ran into one problem, pages from the mobile site were being displayed with desktop theme. I used theme key to fix this problem.
It is not the best solutions but it works.

TJ

grndlvl’s picture

StatusFileSize
new1.34 KB

This is caused by calling "drupal_bootstrap(DRUPAL_BOOTSTRAP_PATH);" which is no longer valid for boot strapping Path...

Not sure if this is the correct fix but it seems to work well.

drupal_bootstrap(DRUPAL_BOOTSTRAP_LANGUAGE, FALSE);
include_once DRUPAL_ROOT . '/' . variable_get('path_inc', 'includes/path.inc');

The reason I do not call drupal_path_initialize(); is because of #1224178: Conflict with Pathauto which seems to actually be an even bigger issue #1224956: hook_module_implements_alter ignored in earlier phases of bootstrap.

Also this enables context to work(Probably best fit elsewhere).

grndlvl’s picture

Status: Active » Needs review
meSte’s picture

It's not working for me with D7.7 + Mobile Tools 2.x-dev + Pathauto 1.0RC2.
I still have the same blank content in /admin/config/search/path/patterns.
I just needed to configure pathauto for a site not in production, so I disabled Mobile Tools for a while to workaround the problem but I'm still interested in this issue.

devin carlson’s picture

Status: Needs review » Closed (duplicate)