If you create a rule that fills in the default value for a node_reference type CCK field, it will not work when requesting the form.
This is because the default value for fields of this type aren't stored in $field['#default_value'][0]['value'] but in $field['#default_value'][0]['nid']
The attached patch simply always fills in 'nid' as well as 'value'. I have no idea what the correct way is to determine the name of the value element, but at least the patch works and doesn't appear to break existing other field types.
| Comment | File | Size | Author |
|---|---|---|---|
| rules_forms.rules_.inc-node_reference.patch | 617 bytes | Peter Bex |
Comments
Comment #2
mitchell commentedI think the problem is that the patch isn't from rules' root directory.
Comment #3
mitchell commentedrules_forms.rules_.inc-node_reference.patch queued for re-testing.
Comment #5
mitchell commentedComment #6
Peter Bex commentedWait, why are you closing it as won't fix?