'Edit Mode on Content Page doesn't work with custom theme - Liferay

I'm using Liferay Theme Generator 10.2.0 and node 14.16.1 for LF 7.2 C.E.

I'm creating a custom theme, but I have found that the fragments editor toolbar is not displayed in my theme.

I mean, I can drag and drop fragments into a content page, but I'm unable to edit them.

This is the fragment's toolbar with classic theme: Fragments toolbar

This is the same fragment, in my custom theme without that toolbar: enter image description here

In dev tools console I got this:

?browserId=other&minifierType=&languageId=es_ES&b=7201&t=1641473471478&/o/js/resolved-module/[email protected]/js/components/floating_toolbar/FloatingToolbar.soy.js&/o/js/resolved-module/[email protected]/js/components/floating_toolbar/FloatingToolbar.es.js&/o/js/resolved-module/[email protected]/js/components/floating_toolbar/fragment_configuration/field_types/ColorPaletteFieldDelegateTemplate.soy.js&/o/js/resolved-module/[email protected]/js/components/floating_toolbar/fragment_configuration/field_types/ColorPaletteField.soy.js&/o/js/resolved-module/[email protected]/js/components/floating_toolbar/fragment_configuration/field_types/ColorPaletteField.es.js&/o/js/resolved-module/[email protected]/js/components/floating_toolbar/fragment_configuration/field_types/CheckboxFieldDelegateTemplate.soy.js&/o/js/resolved-module/[email protected]/js/components/floating_toolbar/fragment_configuration/field_types/CheckboxField.soy.js&/o/js/resolved-module/[email protected]/js/components/floating_toolbar/fragment_configuration/field_types/CheckboxField.es.js&/o/js/resolved-module/[email protected]/js/components/common/AssetSelector.soy.js&/o/js/resolved-module/[email protected]/js/components/common/AssetSelector.es.js&/o/js/resolved-module/[email protected]/js/components/floating_toolbar/fragment_configuration/field_types/ItemSelectorFieldDelegateTemplate.soy.js&/o/js/resolved-module/[email protected]/js/components/content/CreateContentDialog.soy.js&/o/js/resolved-module/[email protected]/js/components/content/CreateContentForm.soy.js&/o/js/resolved-module/[email protected]/js/components/content/CreateContentForm.es.js:formatted:576 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')

enter image description here enter image description here

Any ideas about a posible way to fix it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source