In 5.x-2.4, child nodes had a variable $form['#node']->parent_node at hook_form_alter() that linked them to their parents. In 5.x-2.5, it seems to have disappeared. So far I haven't found the commit that removed it. This breaks my code that depends on that link.

Without this link, to determine the parent node in hook_form_alter() I think you'd have to parse the URL, which is considering a hack, right?

Comments

threexk’s picture

I am using this variable to customize the node form based on the parent node.

tacituseu’s picture

The culprit seems to be this change in hook_nodeapi():
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/relativity/...
which removed op 'validate' and its supporting code, at the same time by relying on arg() in the 'insert' part it also broke the ability to create relationships programmatically