Skip to content
Snippets Groups Projects

Issue #3011228: Missing `data-quickedit-entity-id` attribute prevents in-place editing of embedded entities

1 file
+ 7
0
Compare changes
  • Side-by-side
  • Inline
+ 7
0
@@ -64,6 +64,13 @@ function template_preprocess_entity_embed_container(array &$variables) {
if (isset($variables['attributes']['data-entity-embed-display-settings']) && is_array($variables['attributes']['data-entity-embed-display-settings'])) {
$variables['attributes']['data-entity-embed-display-settings'] = Json::encode($variables['attributes']['data-entity-embed-display-settings']);
}
// Add QuickEdit attributes.
if (!empty($variables['element']['#entity'])) {
$type = $variables['element']['#entity']->getEntityType()->id();
$id = $variables['element']['#entity']->id();
$variables['attributes']['data-quickedit-entity-id'] = "$type/$id";
}
}
/**
Loading