How to debug the "new" block thumbnails

Hi, we are using a dynamicly rendered litium solution (eg the html content can be server rendered if we want, defaults to rendering CSR only without server generated html ).

We are not getting any block previews thumbnails and i do not know how to debug this with the “new” JS support.

It should handle CSR blocks right since it uses node/headless?
Do we need to include <section data-litium-block-id="b1041abb-eebb-4e8f-aca5-d6808da0b706"> block </seaction> in the rendered html fot the thumbnails to be generated?

Is there a url that i can use for debugging? pasing the page id and block id? to see what will be created?

Litium version: 7.6

@NilsN Do u know? :slight_smile:

Yeah, the section tag with the id should be there. The thumbnail generator opens the preview page, scrolls to the section with the block id and then takes the screenshot.

But it should be fine to use js only? And it dose not need to be a section? I can add this to the blocks normal wrapper?

As long as it has the data-litium-block-id attribute it should find it. You can see the thumbnail generator script in Files\NodeServices\<version hash>\generateThumbnail.js.

I have added the data id-s but the generateThumbNails script still returns:

[{systemId: "98b6a14a-4443-4d9b-ac8f-209d60612a81",…}]
authority: "blockthumbnail"
channelSystemId: "ca5e19e1-722f-4c7a-87f2-9a19ba9bf5dd"
largeThumbnailUrl: null
systemId: "98b6a14a-4443-4d9b-ac8f-209d60612a81"

Any tip where to go from here?

What does CSR stand for?

I am also confuse you said “defaults to rendering CSR only without no html”. Some requirement in order for the system to capture thumbnails:

  • A Body tag should exist.
  • Blocks should be rendered in the output HTML.
  • Blocks should be marked by an element with “data-litium-block-id” attribute whose value is the block’s system id.
  • The rendering time should be less than 1 second.
  • Blocks should be visible. So make sure to check Target groups, channels to make sure blocks are visible.

OKi, so the block seams to be generating when we use our old domains, but when we acces the backoffice from our newest,the block dose not seam to generate. Should the url we access the backoffice have any inpact? or was this just a fluke?

Client Side Rendering

1 Like

Do the public site and the back office running on the same domain? Are they on HTTPS with valid certificate?

Soo, it only start working if we add the domain to the litium servers hostfile and points it to localhost.
Is this a knows thing?

Are there any restrictions on the new back office domain? Like it’s only accessible from certain IP addresses. In another case when the thumbnail wasn’t being generated it was because the IP of the server itself wasn’t whitelisted.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.