- π·πΊRussia marassa Moscow
@brenk28, the patch did not work for me (core 9.5.11) - the default value still not saved. Eventually I bit the bullet and switched to Entity Prepopulate module which does not have this (and other) problems.
Hi there! First I wanted to say thank you so much for the port. It is working great for text fields and a few others. I might have missed something but filing this issue for posterity. ^_^
The Field Default Token module is not correctly working for Entity Reference Fields. When you save a token in a field of type entity reference and go back to the field edit screen you will see the token has not been saved. Other fields do not have this problem.
In hook_field_config_presave the following logic doesn't seem to work for entity reference fields and the $has_token never gets set to true.
/** @var \Drupal\field\FieldConfigInterface|\Drupal\Core\Field\FieldConfigInterface $field_config */
$has_tokens = FALSE;
foreach ($field_config->getDefaultValueLiteral() as $item) {
The getDefaultValueLiteral doesn't work for entity reference items and returns empty.
N/A
N/A
N/A
N/A
Active
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
@brenk28, the patch did not work for me (core 9.5.11) - the default value still not saved. Eventually I bit the bullet and switched to Entity Prepopulate module which does not have this (and other) problems.