Closed (fixed)
Project:
Token
Version:
5.x-1.11
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jul 2008 at 21:10 UTC
Updated:
31 Jul 2008 at 04:47 UTC
Jump to comment: Most recent file
After upgrading Pathauto i have noticed that my site is getting the white screen of death on submit. I have tracked the problem down to the auto alias check box. When checked the white screen happens on submit and with the box unchecked it submits normally.
I also cannot get to the pathauto admin page to change settings, I get a white screen also.
I have run out of ideas... Can anyone help.
Thanks,
Jp
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 278321_token_node_standards.patch | 724 bytes | greggles |
Comments
Comment #1
gregglesWhich version of token module do you have installed?
Comment #2
jep214 commented5.x-1.11
Comment #3
gregglesThis problem is usually caused by token module not actually being installed/enabled. So, if token is installed/enabled then there is probably a critical PHP error which is occurring somewhere in the processing. That error should show up in the "watchdog" log (admin/logs/watchdog) or in your apache or php error log (location depends on host...).
I'll need that error in order to understand/fix this issue.
Comment #4
jep214 commentedFound this error any idea's.
PHP Parse error: syntax error, unexpected T_BREAK in token/token_node.inc on line 276, referer: /node/18/edit?destination=admin%2Fcontent%2Fnode
Comment #5
jep214 commentedthis is what i got for those lines in that doc....
/**
* Check if mid/path is present in the menu.
*
* @param $in
* Numeric input is treated as a menu-id, strings as src-paths.
* @return
* An existing mid, or 0 if none found.
*/
function token_menu_get_mid($in) {
global $_menu;
if (!is_numeric($in)) {
if (isset($_menu['path index'][$in])) {
$mid = $_menu['path index'][$in];
}
else {
$mid = 0;
}
}
else if (!isset($_menu['visible'][$in])) {
$mid = 0;
}
// temporary paths would break much of this module
if ($mid < 0) $mid = 0;
return $mid;
}
Comment #6
gregglesWhich version of token are you using?
Comment #7
jep214 commented5.x-1.11
Comment #8
gregglesWell, if there were an error like this in that released version of token module then we would have a bunch of bug reports about it, but we don't. I also just downloaded a fresh copy of that revision of code and checked it for syntax errors and found none.
I suggest you try downloading a fresh copy of 5.x-1.11 and replace your current version with that. It should fix this problem.
Comment #9
gregglesComment #10
jep214 commentedit did not fix the problem... I have reinstalled and new copy of token and pathauto... Any other ideas.
Comment #11
gregglesThe specific section of code that you are referring to has been in this module since 5.x-1.7 which is more than a year ago.
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/token/token...
I'm really stumped on what could be causing this since nobody else has reported it. Are you using a patch?
Comment #12
jep214 commentedNo, we are not using any patches.
Comment #13
jep214 commentedI think I have found the problem and fixed it.
I have edit the line of code that read this:
// temporary paths would break much of this module
if ($mid < 0) $mid = 0;
To this:
// temporary paths would break much of this module
if ($mid < 0) {
$mid = 0;
}
Comment #14
gregglesThanks for finding this. I'm quite stumped that it works fine on so many other sites but not yours.
Regardless, it's not in line with the coding standards so I think we should definitely fix it and have attached a patch to fix it (and clean up the comment style).
Since this is pretty trivial I plan to apply it in a few days unless someone has reason not to.
Comment #15
jep214 commentedGlad to help
Comment #16
jep214 commentedOk turns out this whole problem might have just been due to a problem with my drupal install... I updated to 5.8 and everything works fine... even with the old code... sorry.
Comment #17
gregglesCommitted to 6.x http://drupal.org/cvs?commit=127488 and 5.x http://drupal.org/cvs?commit=127487.
Thanks, jep214!
Comment #18
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.