Hi,
I did get a sql-error in node-module::load_node() when previewing or saving a new node (and actually not even using node hierarchy but using Token in that auto-title thing).
After a bit of looking through the code I figured out that it was caused by an empty parameter, and that the function-call lies in "nodehierarchy_token.inc".. the error lies in the following lines:
if ($type == 'node') {
$node = $object;
$parent = node_load( $node->parent );
there's is no check if $node->parent is actually set, and as (god knows why) it wasn't set in my case, that triggered the error.
A simple "&& isset($object->parent)" added to the if-condition seems to do the job for me... hope I'm not missing anything ;-)
| Comment | File | Size | Author |
|---|---|---|---|
| nodehierarchy_token.patch | 465 bytes | bforchhammer |
Comments
Comment #1
ronan commentedthanks for the patch, I'll test and apply as soon as I get a chance
R
Comment #2
ronan commentedpatch looks good. Committed it with some minor changes.
Thanks again and sorry it took so long for me to get around to this
Ronan
Comment #3
ronan commentedComment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.