- Issue created by @Striknin
- Merge request !4Fix link label displaying token name when token has an empty value. → (Open) created by Striknin
- 🇫🇷France Striknin Lyon
striknin → changed the visibility of the branch 3471561-empty-token-value to hidden.
Hi,
When a token is provided as link label in field formatter, the button is displaying token name if its value is null.
Token replacement must implement ['clear' => TRUE] option to make it work as designed : display email if label is null.
In "/src/Plugin/Field/FieldFormatter/ObfuscateFieldFormatter.php" :
replace :
$linkLabel = $token->replace($linkLabel, [$entity->getEntityTypeId() => $entity]);
by
$linkLabel = $token->replace($linkLabel, [$entity->getEntityTypeId() => $entity], ['clear' => TRUE]);
Active
2.0
Code
striknin → changed the visibility of the branch 3471561-empty-token-value to hidden.