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

CommentFileSizeAuthor
#1 node-609090-1.patch706 byteste-brian

Comments

te-brian’s picture

StatusFileSize
new706 bytes

Here is the promised patch.

greggles’s picture

Looks good to me.

jim0203’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me too. node_get_types() has been depricated for D7, replace (in this context at least) by node_type_get_name(). RTBC.

dries’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

Committed to CVS HEAD. It looks like this code is untested though, so marking 'code needs tests'.

te-brian’s picture

Awesome. 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.

mcarbone’s picture

Assigned: Unassigned » mcarbone

A 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.

mcarbone’s picture

Component: node.module » menu.module
Status: Needs work » Fixed

Since 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.

Status: Fixed » Closed (fixed)
Issue tags: -Needs tests

Automatically closed -- issue fixed for 2 weeks with no activity.