SOLVED: Featured Image displays a default image when the post has no featured image

Bricks Version: 1.5.3

I’m creating a single post template and am trying to set up the post featured image.

The problem is, if a post has no featured image (it is empty) this will always show the same image even on different posts, instead of showing no image at all.


here is an example of a post that has no featured image, however, as all posts without a featured image, it will still display this image for some reason

Hi Jaime,
Thanks so much for your report!

Unfortunately, I cannot reproduce the issue. Can you provide me with your template as template.json?

Best regards,
timmse

Hey Timmse once again thank you for taking a look at this, I really appreciate it, here is a video of the problem, if necessary I can give direct access to this installation:
https://drive.google.com/file/d/1sfF5mG5gQFF76aBX626pHnsyQOV136_Q/view?usp=sharing
(direct video preview should be available soon as I just uploaded it)

I have managed to fix the issue by deleting that image!
I just deleted that one image and bam, the problem seems to be fixed

Hi timmse,

I also had this issue. But it only happens/happened when a post was selected to display in a template when I was working on it.

When I cleared the “example-post” AND briefly opened the featured image settings, the example image is cleared and no longer shows on posts without a featured image.

Perhaps this is already fixed. I haven’t used a template (with example) anytime recent.

Kind regards.

Hi Jaime,
Ok - no idea what was going on, but let’s consider it a solved problem for now.

Hi Peter!
By “example-post” you mean “populate content”?
I’d have to take a closer look.

It has not been resolved, the same thing has happened to me.

It happens when you create a template and add a populate content page to it that has a featured image (in my example: single post / post name).

If after adding populate content you add the image block with dynamic data {featured_image} the posts that do not contain a featured image will always be loaded with the image of the selected populate content.

1 Like

Above mentioned that removing the populate content stops the featured image in the posts that do not have featured image, but at least in my case that does not happen.

If you created the image block having the populate content activated it will always stay like that, it only stops appearing when you remove the populate content and add the image block again.

I have the same experience, not just with the image, but with other dynamic content too. It always shows the same data as whatever is used in the populate content setting of the template instead of the actual data of the post.

1 Like

Hey Marcos,
Thanks for the detailed explanations!

With this bug, the details make it reproducible.
I’ve added it to the bug tracker.

Best regards,
timmse

2 Likes

I am having this exact same issue. I did some playing around and found out that the bug occurs when you add dynamic data when you are using the “populate content” feature. Instead of this allowing you to preview content within your template without adding this content INTO your template, it seems that if you are populating content while editing your template, when you save the template, it actually locks this content in as a default fallback or something. I don’t exactly know what it is doing, but that’s a close enough example.

Replicate issue:

First, turn on “populate content”

Also, make sure to add the condition of “post type > pages” for your “single” template.

Once you are populating content, add an image and choose the dynamic content of “featured image”.

SAVE.

Now, any page that has no featured image will automatically show the featured image of the page you were populating into the template.

Let me know if you can replicate this issue now.

Hey guys,
Bricks 1.6 (Beta 2) contains a fix for this problem.

You can download it manually in your account:
https://bricksbuilder.io/account/?v=1.6-beta2

Best regards,
timmse

Actually, I am using v 1.6 and the issue seems to still remain. I populated content while working on a template, and then I edited the page itself. The old populated content is the version that remains even after editing the page. I can’t figure out how to make the new content appear. I blanked the populate content and resaved the template, but the old populated content still remains.

Hi Michael,
I cannot reproduce the problem with either 1.6 or 1.6.1 :thinking:

Is your template a general page template or a specific one?

So, this issue is related to a separate issue I am discussing in in another report. The “old content” wasn’t old … it was the Gutenberg version that was not styled. I figured out the “render with” functionality which allows me to choose how the content is displayed.

Long story short, the issue from THIS report seems to be resolved.

1 Like