Issues with 'Date' and 'Video' blocks when using Frontend Rendering in Query blocks

Description:

I have a simple query set up to get posts from a custom post type. As soon as I turn ‘Frontend Rendering’ on, a number of issues occur, only on the front end:

  1. A Cwicly ‘Video’ block, which is set to source ‘Dynamic’, ‘ACF’ and ‘Current Post’, renders an empty div. When the source is set to ‘Static’, i.e. the same video for all posts, it renders fine.

  2. The standard Gutenberg ‘Date’ block is not generating any HTML code on the front end at all.

  3. When adding a ‘Date’ block inside a ‘Div’ block, the query stops returning posts and the console shows the following error: “Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘taxonomyterms’)” in BlockMaker-Ya5typht.js

Environment info

All software is up-to-date.

I have had front end rendering issues when my permalinks were not set to post name. Are your permalinks set properly?

Sorry for the late reply. I got sick and then busy with other projects.
Yes, the permalinks are set to post name.

The same issues are still there, after the latest software updates.

Hi @jipsa,

For this first point, I recommend checking the Rest API settings as per @Araminta’s message here:

2 Likes

Great, thank you. First item solved.

1 Like

For the other 2 items, perhaps use a Cwicly Paragraph block instead of a Date block and then use the dynamic content to insert the post date.

This should solve the issue.

1 Like

EDIT: that works for issues 2 and 3. Thanks!

I just noticed a new issue, which might be a bug, or a limitation of front end rendering.

  1. I am showing the terms for each post using a Taxonomy Terms block. To be able to set a different background color for each term, I have added a static attribute named ‘style’, which gets an ACF colorpicker value and uses this as background-color. The attribute value looks like this: background-color:{acffield=pkl_story_type_color=taxterm}

This works great, but stops working when I turn frontend rendering on. I did enable the REST API for that ACF field group as well.
Any ideas?

1 Like

I don’t have time to test that right now, but from memory it may be related to this: