SOLVED: Bricks v1.9.1.1 with error on echo:function

Hi, im facing a problem with my Intranet at my work:

After update to 1.9.1.1 (the latest) all my conditions that uses {echo:myFunction(param)} and even just to print data with {echo:function} is not working anymore. I don’t know if is something related with WPCodeBox 2 that is the plugin im using for code snippets or if is something related with bricks, but, after that, if I return to Bricks 1.8.1 (my latest version working) the dynamic data is not working either. The only solution I found was restore a complete backup of my site.

Sorry for my English, it’s not my native language.

1 Like

Same issue here any fixes yet?

Hi guys,
Thanks so much for your report(s)!

Unfortunately, I cannot reproduce the problem. Would you be so kind as to send temporary login credentials, a short description of where we can see the issue, and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase?

Best regards,
timmse

@timmse
Just sent an email for my case.

Thank you wissam. Unfortunately @timmse it’s a Intranet of my company so, Im not able to share login credentials buy I’m curious if @wissam use WPCodeBox or ACF and facing the same problem.

@noobato yes I’m using ACF and WpCodebox
I was echoing a function in taxonomy query and my posts stopped showing when udpating to 1.9.1.1

This is the reply i got hope it helps you

From 1.9 onwards, Bricks enhanced the query to only execute each unique query once, and this might cause your logic not working correctly.

You can use this filter to remove this enhancement. Although this is not recommended, but if you are not able to tweak your custom code to work on 1.9.1, then the fastest way is to use this filter to tell Bricks run the query multiple times even if the query parameters are the same.

1 Like

Thanks man… so for my undertanding… is nothing related with WPCodeBox or its way of work with Bricks?

I have the same problem:



Hi Christopher,
You must return the result, not echo it.

@wissam Did Jenn’s reply to your email help you? You didn’t get back :slight_smile:

1 Like

Wohoo - thanks @timmse !!!

@timmse
Is this related? from 1.9 to 1.9.1 and 1.9.1.1 this echo dynamic data is not working anymore, instead of the first letter I get all the other letters of the name.

{echo:substr({post_title}, 0, 1)} (in a basic text element)

I have a custom post with customer reviews and the “post title” is the name of the customer, I am using the first initial letter of the name for the avatar if image profile is not available.

Hi Sandro,

I am able to replicate this issue.
As a temporary workaround, please add quote for your 0 argument.
{echo:substr({post_title}, '0', 1)}

Already recorded this issue in the bug tracker.

Regards,
Jenn

1 Like

Hi guys,
We’ve fixed this issue in Bricks 1.9.3, now available as a one-click update in your WordPress Dashboard.

Changelog: Changelog – Bricks

Please let us know if you are still experiencing issues.

Best regards,
timmse