- Issue created by @eswiderski
- π©πͺGermany jurgenhaas Gottmadingen
This is caused by the usage of the message
list-related = [list-related]
which has to Yaml-encode the complex content of thelist-related
token into a string. As this token contains objects that can't be encoded, this exception is being thrown.The Yaml encoder comes from Drupal core which uses the Yaml dumper from Symfony. I am not sure if and what they changed in that regard, but serializing a list of entity references is probably something that can and should be avoided.
- πΊπΈUnited States eswiderski
Thanks @jurgenhaas.
Do you have a better suggestion to simply store a list of entity ID's from a reference field (to enable a loop action on each of the referenced entities)?
- π©πͺGermany jurgenhaas Gottmadingen
Do you need to store them? The problem is not about storing them but the fact that the message needs them as a string, when you want to display the list.
If you take the list and then loop over that list, without displaying the list on screen, then you should be fine already, aren't you?
- Status changed to Postponed: needs info
about 2 months ago 9:41am 24 July 2024 - π©πͺGermany mxh Offenburg
For me this is a bug, since the error may come from user configuration as shown here. The DTO implementation obviously does not properly cover the conversion of typed data objects into strings when requested. This should be fixed within the DTO implementation.
- πΊπΈUnited States eswiderski
@mxh This also feels like a bug to me, given it only occurs with Storage entities (action = Presave Content Entity Type -> Storage). If I create a similar process based on action Presave Content Entity with type Content, no error appears for me.
@jurgenhaas Confirmed, I'm not storing them, so looping through them on my process does work. I mainly just wanted to display it for debugging it.
This is certainly not critical and my process works, so should probably be very low priority.
Thank you!