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

CommentFileSizeAuthor
#14 278321_token_node_standards.patch724 bytesgreggles

Comments

greggles’s picture

Status: Active » Postponed (maintainer needs more info)

Which version of token module do you have installed?

jep214’s picture

5.x-1.11

greggles’s picture

This 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.

jep214’s picture

Found 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

jep214’s picture

this 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;
}

greggles’s picture

Title: Auto Alias is cuasing White Screen » unexpected T_BREAK in token_node.inc
Project: Pathauto » Token
Version: 5.x-2.3 » 5.x-1.x-dev
Component: Miscellaneous » Code

Which version of token are you using?

jep214’s picture

5.x-1.11

greggles’s picture

Well, 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.

greggles’s picture

Version: 5.x-1.x-dev » 5.x-1.11
jep214’s picture

it did not fix the problem... I have reinstalled and new copy of token and pathauto... Any other ideas.

greggles’s picture

The 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?

jep214’s picture

No, we are not using any patches.

jep214’s picture

I 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;
}

greggles’s picture

Title: unexpected T_BREAK in token_node.inc » unexpected T_BREAK in token_node.inc - and coding standards
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new724 bytes

Thanks 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.

jep214’s picture

Glad to help

jep214’s picture

Ok 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.

greggles’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.