diff --git a/src/bundle/Resources/public/js/scripts/embedded.item.actions.js b/src/bundle/Resources/public/js/scripts/embedded.item.actions.js index cc30fad1fe..d3f3e12c8a 100644 --- a/src/bundle/Resources/public/js/scripts/embedded.item.actions.js +++ b/src/bundle/Resources/public/js/scripts/embedded.item.actions.js @@ -150,7 +150,14 @@ languageCode: languages[0].languageCode, }), } - : { onClick: () => editContent({ contentId, locationId, languageCode: languages[0].languageCode }) }; + : { + onClick: () => + editContent({ + contentId, + locationId, + languageCode: languages[0].languageCode, + }), + }; return { label: Translator.trans(/*@Desc("Edit")*/ 'embedded_items.action.edit', {}, 'ibexa_content'), @@ -226,6 +233,7 @@ container, triggerElement, }); + menuInstance.init(); menuInstance.generateMenu({ triggerElement, diff --git a/src/bundle/Resources/public/js/scripts/fieldType/ezobjectrelationlist.js b/src/bundle/Resources/public/js/scripts/fieldType/ezobjectrelationlist.js index 332a93fc84..1f30768773 100644 --- a/src/bundle/Resources/public/js/scripts/fieldType/ezobjectrelationlist.js +++ b/src/bundle/Resources/public/js/scripts/fieldType/ezobjectrelationlist.js @@ -79,10 +79,9 @@ 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 languageCodes = item.ContentInfo.Content.CurrentVersion.Version.VersionInfo.VersionTranslationInfo.Language.map( - (language) => language.languageCode, - ); + const { VersionInfo } = item.ContentInfo.Content.CurrentVersion.Version; + const currentVersionNo = VersionInfo.versionNo; + const languageCodes = VersionInfo.VersionTranslationInfo.Language.map((language) => language.languageCode); const itemActionsMenuContainer = relationsContainer.querySelector('.ibexa-embedded-item-actions__menu'); const itemActionsTriggerElement = relationsContainer.querySelector('.ibexa-embedded-item-actions__menu-trigger-btn'); const itemNodeNameCell = itemNode.querySelector('.ibexa-relations__item-name');