Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

6.4.5 Dynamic template editor does not work when cq:datatype is JSON

Avatar

Level 1

The context switching (structure/edit/..) does not work and editables does not show up because core.js waits for a "cq-pagemodel-loaded" event.

The latest @adobe/cq-spa-page-model-manager (1.0.7) npm library submit this event after it fetches the page model but it is not received by the listener in core.js, I believe it is because it submits the event on the wrong window object.

Doing a manual submit fixed the problem in our case, so i'm posting this as a workaround for those who experience it.

   window.parent.postMessage(

   JSON.stringify({

   data: {

   model: this.state.pageModel

  },

   type: 'request',

   group: 'cqauthor',

   msg: 'cq-pagemodel-loaded'

  }), "*");

We don't use cq-spa-page-model-manager but when experiencing the problem I tested it and found that it had this issue.

0 Replies