'$node' isn't recognized when used in the PHP pattern. This happens because drupal_eval() is used and $node isn't in its scope. I'm attaching a patch that fixes this --by evaluating directly. That's, btw, the tactic used by Views (in its 'Argument Handling Code').

I've searched this queue and, surprisingly, the 'official' guidance is to use '$form_values' instead of the non-existing '$node'. I explained here why '$form_values' won't work when using non-trivial CCK widgets.

It's true that tokens can be used. Nevertheless, it would be nice to have access to $node as well.

CommentFileSizeAuthor
ant_nodephp.diff555 bytesmooffie

Comments

fago’s picture

Status: Needs review » Fixed

thanks, I've improved a bit and added some notes and docs. please test it.

I've added this to 5.x-dev and to the 6.x beta release.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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