10 Replies Latest reply on Jul 24, 2017 1:32 AM by christofhed35451717

    [AEM 6.3] AEM form components with data-sly-resource result javascript errors

    Jarflux Level 1

      I'm trying to build a component that consists of multiple other components without duplication of code.


      So I tried to build an empty component that contains a data-sly-resource to include another component


      <div data-sly-resource="${'path/to/resource' @ resourceType='my/resource/type'}"></div>



      This resulted in a component that can be dragged from the sidekick and is rendered correctly.
      But when I try to click the component to configure the the component, instead of showing the black edit bar it throws the javascript error below.


      Uncaught TypeError: Cannot read property ‘hideTitle’ of undefined
         at hideTitleExists (form.js:2430)
         at guidetouchlib.editToolbar.appendButton (form.js:2461)
         at core.js:23633
         at Array.forEach (<anonymous>)
         at guidetouchlib.editToolbar.render (core.js:23632)
         at guidetouchlib.editToolbar.render (form.js:2538)
         at guidetouchlib.editToolbar.open (core.js:9645)
         at HTMLDocument.<anonymous> (core.js:9385)
         at HTMLDocument.dispatch (jquery.js:5226)
         at HTMLDocument.elemData.handle (jquery.js:4878)


      The included component is working perfectly on its own.

      I have tried to add a data-sly-unwrap, without any succes


      Steps to replicate this issue:
      - Install AEM 6.3
      - Install Adobe Forms packages ( adobe-aemfd-osx-pkg-4.0.74.zip )

      - Restart AEM to complete Adobe Forms installation
      - Install custom content package containing 2 components and a test form ( demo-form-sly-resource.zip - Google Drive )
      - Go to test form containing the 2 components http://localhost:4502/editor.html/content/forms/af/blank-test-form.html
      - Open javascript console in developer tools
      - Click on child component to validate the edit bar appears
      - Click on the parent component to trigger the javascript error that prevents the edit bar from appearing


      Kind Regards,




      Het bericht is bewerkt door: Ben Oeyen Added steps to replicate this issue.