Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I want to write automaticilly a contact of car rental.
I have created a content type for a "car" (with fiels for the name the license number and another for the people who rents the car with field for name. In this last content, I have added an entity field which points towards the content type "car" and another for the body in which I want to use token insert.
I insert a token for the name of people who rent the car : [node:field-nom] and it works.
and others tokens linked to the car :
- [node:field-nom-veh] for the nameof the car
- [node:field_immatriculation] for the license number
These 2 tokens does not work.
Thank you
Comments
Comment #1
attiks CreditAttribution: attiks commentedToken insert only does the insert, if they don't get replaced it might be a token or entity problem
Comment #2
altbzh CreditAttribution: altbzh commentedok thank you
Comment #3
attiks CreditAttribution: attiks commentedMoving to token issue queue, if it isn't a token problem, feel free to move it back
Comment #4
Dave ReidDo these tokens produce the proper values on the node/[nid]/devel/token page of the reference node (if you have Devel module enabled)? If so, then this isn't a token module issue, it's an issue with the module calling token_replace() not providing the correct data.
Comment #5
Dave ReidComment #6
altbzh CreditAttribution: altbzh commentedSorry Dave : I was away ....
When I look at Devel/token, there is nothing for the token of the entity reference token ... so does it mean that the problem com from entity reference token ?
Thank you
Comment #7
bkloef CreditAttribution: bkloef commentedI just came across the same problem. I wanted to allow one or more nodes to refer back to a "parent" node. Entity reference seemed the way to do this, but my URL aliases were completely missing this segment. Activating devel revealed no value for the entity reference token.