Closed (fixed)
Project:
Automatic Nodetitles
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2008 at 16:33 UTC
Updated:
22 Jun 2008 at 14:22 UTC
'$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.
| Comment | File | Size | Author |
|---|---|---|---|
| ant_nodephp.diff | 555 bytes | mooffie |
Comments
Comment #1
fagothanks, 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.
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.