WAIT: Problem with image dynamic data

Hello !

I need to load an image based on the post ID, with a custom function.
So I use an image element with dynamic data : {echo:my_function({post_id})}.
But the post_id var does not seem to be evaluated (confirmed by a dump, just get a ā€˜post_idā€™ string).

Tell me if you need more info.

Thank you.

Hi,
Thanks so much for your report, and sorry for the late reply!

Would you be so kind as to send temporary login credentials, information on where we can find the function and where it applies, and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase?

Best regards,
timmse

I too am having an issue with the newest version of Bricks. Whenever I use a dynamic code for the image. Itā€™ll populate the image above the dynamic input and only use that image. Whatever it may be. The only workaround I had was to make a custom function that calls the same image that the dynamic input wouldā€™ve called.

Hey @OhJey ,
Would you be so kind as to send temporary login credentials, information on where we can find the function and where it applies, and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase?

Sadly no all my WP spinoffs are in a local environment.

Then, unfortunately, I canā€™t do anything else, because I still canā€™t reproduce the problem.

Hello @timmse ,

I canā€™t give access to the website.
However, I forgot to mention an important detail that seems to cause the issue : my image element is inside a query loop.

So : {echo:my_function({post_id})} works fine, but not in a query loop (just tested).

Guys, one of you needs to provide us with an installation. Otherwise this will go nowhere until we can reproduce the problem.

I have no time to provide a test installation at the moment, but itā€™s pretty simple to reproduce :

  • Create a query loop with an image inside
  • Set dynamic data as image url : {echo:my_function({post_id})}
  • Create function my_function($post_id) {ā€¦}
  • Check the $post_id parameter (a dump for example), it renders the string ā€œpost_idā€ instead of the post ID.

Hey @mvuidev ,
I still cannot replicate the issue with Bricks 1.9.2 :thinking:

What exactly is the content of your function?