Postponed (maintainer needs more info)
Project:
Multifield
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Apr 2014 at 11:32 UTC
Updated:
16 Feb 2018 at 14:34 UTC
Jump to comment: Most recent
Comments
Comment #1
dave reidWhat module are you using that allows you to use node tokens in fields? A better explanation and steps to reproduce would be helpful here.
Comment #2
bkat commentedI'm not the OP but I believe I understand what is going on as I'm working through a similar problem.
I have some entity reference fields that I want to use a view to generate the list of acceptable values. In may case, I need to pass the value of another field as an argument to the view so I'm using the patch in https://www.drupal.org/node/2010898 to allow the use of tokens in the entityreference view args.
I have a content type named game with a couple of field that are important here:
For team, I want the select list populated with the teams registered for that league and not all the teams in our system.
If I add field_team directly to the content type, I can use [node:field_league:nid] as the views argument and it works awesome.
If I put field_team inside a multifield (I call it field_teams), then I can't access the parent node. I have access to the subfields of the multifield but now way back to the game node. This is happening because the entity is the multifield pseudo entity and not the parent entity.
In my case, I can work around this. I don't directly create games, instead I have a callback that creates a games for a league and randomly assigns the teams from the teams in the league. So I'm always just editing existing nodes. My team content type, also has an entity reference to the league so I can set the view arg token to [multifield:field-team:field-league:nid]
However, it would be nice to be able to access the game that the multifield belongs to via tokens.
Comment #3
q0rban commentedMy use case is wanting to use the entity id in a file path. For example, I'm organizing files for a content type using the node id, resulting in files like:
It works on all my fields except for the ones inside a multifield, in which case I am presented with an error about the [node:*] tokens being unavailable.