I just recently installed Token 6.x-1.13 and noticed that the "number" data type in rules was no longer showing up as a token replacement option. After digging around I saw that the Token module Rule's code now looks for a 'token type' flag to be set in rules_rules_data_type_info(…). If it is set to FALSE then the item wont show up as token replacement.

A while back I introduced a patch #674992 to expose Rule's number data type to the Token module and it looks like I missed this whole 'token type' variable which looks like it was added to Rules in #515608. Sorry about that.

Attached bellow is a patch which changes 'token type' => FALSE to 'token type' => 'number' for the number data type as it does have a proper token definition.

See #674992: "number" types don't show up under token replacement
See #515608: Allow data types to specify a custom token type

Colin

CommentFileSizeAuthor
numberfix.patch435 bytescolin49

Comments

colin49’s picture

Component: Rules Core » Rules Engine
Status: Active » Needs review
fago’s picture

Status: Needs review » Fixed

thanks, committed.

colin49’s picture

np.

Status: Fixed » Closed (fixed)

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