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'm trying to use a 'Auto title generation' utilising tokens for fields within a Field Collection to 'automatically generate the title and hide the title field' but for some reason the tokens do not appear to work (in the pattern for the Title). I can only get this to work if I use tokens related to fields that are not contained within a field collection. Am I doing something wrong? Can you advise what token to use to grab a field within a field collection?
Any help would be most appreciated.
Ste
Comments
Comment #1
servantleader CreditAttribution: servantleader commentedI can confirm the same problem. Tokens seem to not work.
Comment #2
wooody CreditAttribution: wooody commentedHere too.... hope to fix this problem..
Comment #3
dlu CreditAttribution: dlu commentedI'm having a similar problem. I'm trying to use Automatic Entity Label to generate a node title using tokens from fields contained in a field collection. When I browse the available tokens, I see the name of the field collection, and if I include it I see the "rendered entity" of the field collection – labels, values, even the text from the edit and delete links. I can't seem to find a way to get at the individual values of the fields (which are references to taxonomy terms).
Comment #4
dlu CreditAttribution: dlu commentedThanks to #drupal-support I now have it working. The trick for me was to make sure I had the Entity Tokens module enabled (thank you @spacerabbit!).
Just in case it matters, I'm working with beta5.
Comment #5
jmuzz CreditAttribution: jmuzz commentedComment #7
liquidcms CreditAttribution: liquidcms commentedHey to re-open this but it isn't working for me.
I have an entityref field in a fc field and the latest releases of fc and entity.
My title pattern is this: [node:field-week]: [node:field-teams:0:field-team] vs [node:field-teams:1:field-team]
When i save a node i get this for title:
Week 3: [node:field-teams:0:field-team] vs [node:field-teams:1:field-team]
but, if i edit the node and re-submit; then it works correctly.