Like a number of other posters I had an issue with CCK field tokens not working.
My problem: I have a set of Rules that sets a number of CCK fields based on a user reference CCK field. I want to use these CCK fields in my auto_nodetitle. These CCK fields only get set by the Rules after Auto_nodetitle has already run, so my title is empty.
Underlying problem: auto_nodetitle currently has a weight of 5 in the system table, where Token has 10 and Rules has 20. So auto_nodetitle gets called first, then the other two.
My solution: Set auto_nodetitle weight to 500 (or anything above 20 will do, but it's an INT(11) field, so go crazy). I don't see any reason for it to be low, so high is good, you want everything to be finished before auto_nodetitle does its thing. I've added a patch that does this, you'll need to run update.php after applying it.
It might solve other issues with CCK tokens as well, feel free to try.
Len
Comment | File | Size | Author |
---|---|---|---|
change_weight_after_token_rules.00.1.patch | 841 bytes | Lendude |
Comments
Comment #1
Utkarsh_Mishra CreditAttribution: Utkarsh_Mishra at OpenSense Labs for DrupalFit commentedComment #2
gaurav.kapoor CreditAttribution: gaurav.kapoor commentedWe aren't fixing any of the D6 issues. If somebody is having this issue, please use the patch provided. If somebody wants me to work on D6 branch can open a separate issue.