diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ezobjectrelationlist.js b/src/bundle/Resources/public/js/scripts/fieldType/ezobjectrelationlist.js index 149724760f..5dd57de293 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ezobjectrelationlist.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ezobjectrelationlist.js @@ -79,7 +79,7 @@ const itemNode = itemNodes[itemNodes.length - 1]; const contentId = escapeHTML(item.ContentInfo.Content._id); const locationId = item.id; - const currentVersionNo = item.ContentInfo.Content.CurrentVersion.Version.VersionInfo.versionNo; + const versionNo = escapeHTML(item.ContentInfo.Content.currentVersionNo); const languageCodes = item.ContentInfo.Content.CurrentVersion.Version.VersionInfo.VersionTranslationInfo.Language.map( (language) => language.languageCode, ); @@ -99,7 +99,7 @@ contentId, locationId, languageCodes, - versionNo: currentVersionNo, + versionNo, menuTriggerElement: itemActionsTriggerElement, menuContainer: itemActionsMenuContainer, }, diff --git a/src/bundle/Resources/views/themes/admin/ui/component/embedded_item_actions/embedded_item_actions.html.twig b/src/bundle/Resources/views/themes/admin/ui/component/embedded_item_actions/embedded_item_actions.html.twig index fe17dad5b9..8d5e25f237 100644 --- a/src/bundle/Resources/views/themes/admin/ui/component/embedded_item_actions/embedded_item_actions.html.twig +++ b/src/bundle/Resources/views/themes/admin/ui/component/embedded_item_actions/embedded_item_actions.html.twig @@ -27,8 +27,8 @@ attr: { 'data-content-id': content_id|default(''), 'data-location-id': location_id|default(''), - 'data-version-no': versionNo|default(''), - 'data-language-codes': languageCodes|default([])|json_encode, + 'data-version-no': version_no|default(''), + 'data-language-codes': language_codes|default([])|json_encode, class: attr.class|default('ibexa-embedded-item-actions__menu') }, items_container_attr: { diff --git a/src/bundle/Resources/views/themes/admin/ui/field_type/edit/relation_base.html.twig b/src/bundle/Resources/views/themes/admin/ui/field_type/edit/relation_base.html.twig index 020303df6e..731d2daff8 100644 --- a/src/bundle/Resources/views/themes/admin/ui/field_type/edit/relation_base.html.twig +++ b/src/bundle/Resources/views/themes/admin/ui/field_type/edit/relation_base.html.twig @@ -103,7 +103,7 @@ {% include '@ibexadesign/ui/component/embedded_item_actions/embedded_item_actions.html.twig' with { content_id: relation.contentId, location_id: relation.contentInfo.mainLocationId, - versionNo: relation.contentInfo.currentVersionNo, + version_no: relation.contentInfo.currentVersionNo, } only %} {% endset %}