Active
Project:
Mobile Switch
Version:
7.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Nov 2012 at 10:25 UTC
Updated:
27 Mar 2014 at 15:26 UTC
Jump to comment: Most recent
Hi,
I'm using the module Pathauto (7.x-1.2) to create alias. Here is my problem, when i create node and mobile_switch is activated, the alias creating doesn't work. It seems like all the tokens using 'menu' (my pattern is '[node:menu-link:menu:name]/[node:menu-link:parents]/[node:menu-link]') return an empty string.
Debugging, i find that the call to drupal_alter at the line 65 of the mobile_switch.module is the reason of that but i have really no idea why, so i need your help.
drupal_alter('mobile_switch_boot', $conf, $get);
Thanks for your time.
Comments
Comment #1
mattew commentedI use Mobile Theme instead of Mobile Switch : http://drupal.org/project/mobile_theme and i don't have the pathauto issue.
Comment #2
quiptime commented@guillaume.d,
If the Mobile Switch Basic setting Administration usage configured to Yes or No?
Comment #3
quiptime commentedI'm not sure if I understand correctly this pattern.
To reproduce your problem I've done the following:
[node:menu-link:menu:name]/[node:menu-link:parents]/[node:menu-link]The result:
No path alias created for the new article node.
Comment #4
Ndesign commentedIm currently running in to the same issue with Mobile Switch and Pathauto. When I disable Mobile Switch i get the following error.
Pathauto seems to be working with menu tokens after disabling mobile switch...is there any patch or fix for this bug? Any help would be greatly appreciated!
Comment #5
rfc2460 commentedHi,
I confirm the issue. I have the same modules: pathauto + mobile switch 7x-2.x-dev.
I also confirm that the issue disappears if I remove the call to drupal_alter in mobile_switch_boot.
Comment #6
rfc2460 commentedOk thanks to my colleagues, we may have an explanation (but not a solution ;)). The problem is really due to the call to drupal_alter in the hook_boot.
When drupal_alter is called, it probably loads a list of the modules that propose hooks (more precisely a list of functions) in cache (thanks to drupal_static). However, in the hook_boot, not all the modules are loaded. It is the case of the menu module that does not implement hook_boot and is then not loaded during the bootstrap. Pathauto relies on token module. When it tries to build the alias, the token module tries to get the menu name but its requests uses the cache in which the menu module functions are not loaded...
So the call to drupal_alter in hook_boot seems very hazardous and it should be rethought.
Comment #7
rfc2460 commentedI change the priority since this issue may be very dangerous and pernicious. it probably has impacts on other modules than pathauto.
Comment #8
Mr.Echo commentedHas any progress been made on this issue?
Comment #9
xiukun.zhou commentedI also have this problem, I need help.
Comment #10
Ndesign commentedThe content auto label module is broken with mobile switch as well.