- 🇫🇷France O'Briat Nantes
I don't know if it's totally related but I use the first part of this MR to link to a block.
The input part works: now the autocomplete let me choose my block instead of a forever loader (+ the ajax call returning a error 500).
But on form submit I got the following error:
"Unable to render elements, please view the below message(s) and the error log.
Call to undefined method Drupal\block\Entity\Block::hasTranslation()
There has been error validating the elements. You may need to edit the YAML source to resolve the issue."I add this modifcation and it seems to fix the problem.
#src/Plugin/WebformElement/WebformEntityView.php:185 $entity_view_language = ($entity instanceof TranslatableInterface && $entity->hasTranslation($current_language)) ? $current_language : $entity->language()->getId();
I'll try to provide a MR later