In node.tokens.inc, there is a call to the old node_get_types()
Old Code: (line 157)
$type_name = node_get_types('name', $node->type);
The Fix (line 157)
$type_name = node_type_get_name($node);
Patch in comment#1
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | node-609090-1.patch | 706 bytes | te-brian |
Comments
Comment #1
te-brian commentedHere is the promised patch.
Comment #2
gregglesLooks good to me.
Comment #3
jim0203 commentedLooks good to me too. node_get_types() has been depricated for D7, replace (in this context at least) by node_type_get_name(). RTBC.
Comment #4
dries commentedCommitted to CVS HEAD. It looks like this code is untested though, so marking 'code needs tests'.
Comment #5
te-brian commentedAwesome. First core patch commit :)
I will have to defer to the Simple Test wizards for the followup. I have yet to really get my hands dirty in that realm yet. It is clear, however, that not very much token testing is being done, based on this bug and a few others that I have created issues for.
Comment #6
mcarbone commentedA comprehensive test I wrote for all taxonomy tokens just got committed, so I might as well do the same for the rest of core's tokens.
Comment #7
mcarbone commentedSince the tests I'm working on are fairly comprehensive, I thought it would be better to open a new issue so others won't miss that it's being worked on: #701818: Several tokens are broken, especially file tokens; test coverage of every core token
Since the fix here is already committed, I'm closing this issue.