- Issue created by @davemaxg
I'm trying to use an entity reference to a Domain entity, then utilize 2 separate tokens from here, one for the site name and the other for the domain name, but I'm getting errors which I believe are because the token doesn't return text as it should, but instead returns an object.
I tried
[easy_email:field_domain:entity:hostname]
[easy_email:field_domain:entity:hostname:name]
[easy_email:field_domain:entity:hostname:name:value]
ResponseText: The website encountered an unexpected error. Try again later.Error: Object of class Drupal\domain\Entity\Domain could not be converted to string in Drupal\Component\Render\HtmlEscapedText->__construct() (line 31 of core/lib/Drupal/Component/Render/HtmlEscapedText.php). Drupal\Core\Utility\Token->doReplace(1, 'Hello from [easy_email:field_domain:entity:hostname:name:value]', Array, Array, Object) (Line: 191)
Drupal\Core\Utility\Token->replace('Hello from [easy_email:field_domain:entity:hostname:name:value]',
Is there a way to avoid this issue by specifying the token in a different way or perhaps easy_email can handle htmlmarkup objects returned by tokens by converting them into text?
Thanks for a very useful module.
Active
3.0
Code