Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • lele 102 posts 429 karma points
    Jul 07, 2020 @ 08:23
    lele
    0

    Hi

    Nice package!

    I'm trying to get the sample block working... everything works except the preview. There I get the following error when I calling the API:

    API-URL (/umbraco/backoffice/api/contentblockspreviewapi/GetPreviewForIframe?pageId=1062&culture=)

    You know what I might have done wrong?

    Thanks and best regards, Manuel

  • Daniël Knippers 153 posts 1116 karma points MVP 2x c-trib
    Jul 07, 2020 @ 15:07
    Daniël Knippers
    0

    Hi Manuel,

    Not sure why it crashes there. We load the current HTML and append a <script> containing the JavaScript to sync scrolling. I suppose the HTML of your page contains "something" that we cannot handle. If you can post the full HTML of your front-end I can have a look what makes it fail.

  • Daniël Knippers 153 posts 1116 karma points MVP 2x c-trib
    Jul 08, 2020 @ 06:41
    Daniël Knippers
    100

    As a follow-up, judging from here this exception is thrown when your HTML has multiple root nodes. For example, if your HTML does not have 1 root like below:

    <html>   
      <head></head>
      <body></body>
    </html>
    

    But perhaps something like this:

    <head></head>
    <body></body>
    

    Regardless, we can probably fix this but please do post your HTML so I can verify this hypothesis.

  • lele 102 posts 429 karma points
    Jul 08, 2020 @ 17:54
    lele
    0

    Hi Daniël

    Yes this is probably the problem because I only had one view without calling Master and RenderBody(). I just wanted to test the package quick & dirty :). With the Master and RenderBody() it works as expected.

    Thanks for your support.

Please Sign in or register to post replies

Write your reply to:

Draft