Skip to content

What is the cause of the error “Unable to process binding “template: function(){return getOptions().template }”

I am creating a custom content-type and when I add it to the page I receive the following error in the console:

Message: getOptions is not defined ReferenceError: Unable to process binding "template: function(){return getOptions().template }"

The component does not finish loading correctly.
In the preview template I have the following html:

<div attr="data.main.attributes"
     class="pagebuilder-content-type card"
     event="{ mouseover: onMouseOver, mouseout: onMouseOut }, mouseoverBubble: false"
>
    <span class="headline with-quarter mb-4 block"
          attr="data.title.attributes"
          data-bind="liveEdit: { field: 'title', placeholder: $t('Enter Title') }"
    ></span>
    <render args="getOptions().template" />
    <!-- Some more markup that does not load -->
</div>

In the content-type I use the default preview js:

<type name="contact_box"
          label="Contact Box"
          menu_section="elements"
          component="Magento_PageBuilder/js/content-type"
          preview_component="Magento_PageBuilder/js/content-type/preview"
          master_component="Magento_PageBuilder/js/content-type/master"
...

Somehow template seems to be missing in the options.