Closed (duplicate)
Project:
Content Profile
Version:
6.x-1.0
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Feb 2011 at 11:20 UTC
Updated:
3 Oct 2011 at 07:04 UTC
Jump to comment: Most recent file
Comments
Comment #1
szeidler commentedSame problem here:
content_profile_tokens.module line 20 is always empty on registration. I think that the node is not created at this point of time.
Comment #2
mrfelton commentedChanging this line to the following resolves this issue. But, I think it may have a bit of a performance hit, since it will cause the node to be fully reloaded for every single token evaluation.
So, my solution is to call
content_profile_load($type_name, $object->uid, '', TRUE);myself just before I want to process the tokens in my custom user registration #submit handler. This causes the content profile cache to be rebuilt, and ensures that the tokens are available for use in my registration handler.Comment #3
kmajzlik commentedhm almost same issue here: i have custom module using
function content_profile_tokens_token_values($type, $object = NULL, $options = array())
and i have ONLY SOME of fields as tokens there. I searched why and found:
content_profile_tokens.module
Why that stupid IF on line #28 ? I have fields with type Integer and widget Select list. Not important why i need select list, but why somebody thought that i do not want that field as token?
Comment #4
jeffamJust ran into this issue myself and decided to test and see what would happen if I allowed text fields using the select box widget to be used as tokens.
Seems to work just fine.
I suspect that there is a reason that only numbers and textfields were allowed to be used, but I can't really see it. As long as multiple fields are being excluded, this should just work.
So here's a patch.
Comment #5
pinoloMarking as duplicate of #1123030: Content Profile Token support for additional widget types, multiple value fields. There, you can find a more comprehensive approach to the issue.