No access to $node in PHP pattern
mooffie - February 20, 2008 - 16:33
| Project: | Automatic Nodetitles |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
'$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.
| Attachment | Size |
|---|---|
| ant_nodephp.diff | 555 bytes |

#1
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.
#2
Automatically closed -- issue fixed for two weeks with no activity.