Since the last upgrade of drupal core to version 11.4.1, the automatic node label using token (with option : Automatically generate the label and hide the label field) takes value like this on node creation : %AutoEntityLabel: 2bd44b2f-2d96-497b-9691-c54824be99c7%.

If I modify the node by just save it, the label of node takes the good name based on token.

Thanks for your help.
Regards

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dcoppel created an issue. See original summary.

ttnt’s picture

I am seeing the same - do you happen to also redirect, perchance using ECA, upon node save?

ttnt’s picture

It seems that tweaking some tokens solved some instances of the token being scrambled, but not all. Drilling down seemed to do something, i.e: use [node:field_product:value] instead of [node:field_product], the later used to be fine though.

I also lost a front-end on my dev site upon saving from a page which redirected on form submission - changing the setting over at admin/structure/types/manage/content-type/auto-label from Create label after first save to Create label before first save solved that issue.

I'm looking forward to hear if this helps for you.

dcoppel’s picture

Hi,
Thanks for your reply !
I was in trouble with 3 differents types of node.
Your first solution by replacing [node:field_product:value] instead of [node:field_product] resolved this issue on 2 of them but not the third one because the token field was type of list item. So id was displayed instead of text...
For this issue on last type of node was solved with the second solution : changing the setting over at admin/structure/types/manage/content-type/auto-label from Create label after first save to Create label before first save.

So you found all the solutions ! Thanks a lot for your help !
Regards

arx-e’s picture

Same issue here on Drupal 11.4.2 simply trying to combine two plain text fields of the same node and set the combination as the title.
I tried to add the :value extension and it kind of works but not quite. Maybe there is an encoding problem or something like that because I totally losing the greek characters.

ttnt’s picture

There is an option "remove special characters", does it work when that is ticked?
I have a feeling some sort of regression was expected at one point by the module authors, giving us all these options to play with, but we then felt the hammer when the 11.4 update dropped... perhaps we are missing something still.

arx-e’s picture

Well there is one issue created by the option "remove special characters" which removes non-latin letters. When this is turned off the unicode letters are preserved.

Also the automatic labelling works fine when the option "Create label before first save" is selected.
It is failing when "Create label after first save" is selected. It seems something goes wrong with (line 273)
drupal_register_shutdown_function('_auto_entitylabel_post_insert', $entity);

dadderley’s picture

I encountered the same issue.
I noticed this in Drupal 11.4.2. The problem persisted in Drupal 11.4.4.

These tokens:
[node:author] - [node:field_address:organization]

Were printed out as:
"%AutoEntityLabel: be0f190d-81f8-4ced-8052-7112284bf814%"

I
- unchecked this option: "Create label after first save".
- checked this option "Create label before first save".
- left "Remove special characters." option not checked.

Now the tokens print out as:
"John Doe | John Doe Org"

This works as it did before with no problem.

arx-e’s picture

Title: Bug on automatic label using token » Automatic label after first save not working any more

arx-e’s picture

Status: Active » Needs review

This change makes the option "Create label after first save" work again for me in Drupal 11.4.4 installations.
This allows the use of tokens like [node:nid] that are not available before first save.

There is also another issue where the option "remove special characters" allows only latin alphabet letters and this is addressed in this issue:
Cyrillic symbols and latin symbols with diaeresis replaced with whitespaces