Skip Navigation

[Resolved] Beaver Builder & Tools conditional shortcode logic compatibility broken?

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 7 replies, has 2 voices.

Last updated by Minesh 1 year, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2699195
Screenshot 2024-04-29 at 2.51.14 PM.png
Screenshot 2024-04-04 at 9.48.34 AM.png

I am trying to: Use Toolset conditional shortcode logic in Beaver Builder photo fields to allow featured image override in template.

Link to a page where the issue can be seen: hidden link

I expected to see: Image + caption on mobile view.

Instead, I got: Image + alt text + caption on mobile view. For a while, image was also broken (see attached screenshot).

The issue began in early March when we upgraded to the new version of Toolset.

We implemented a workaround to make our production site work for now: hidden link

But we'd like to find out if this is a know issue and if you can fix the plugin or if we need to explore alternative ways to use conditional logic with Beaver Builder.

Problematic code we since took out:

[wpv-conditional if="('[types field='use-full-size-image' output='raw'][/types]' ne '' )"][wpv-conditional if="('[types field='alternate-featured-image' output='raw'][/types]' ne '' )"][types field='alternate-featured-image' size='full' url='true'][/types][/wpv-conditional][wpv-conditional if="('[types field='alternate-featured-image' size='full' url='true'][/types]' eq '' )"][wpv-post-featured-image size="full" output="url"][/wpv-conditional][/wpv-conditional][wpv-conditional if="('[types field='use-full-size-image' output='raw'][/types]' eq '' )"][wpv-conditional if="('[types field='alternate-featured-image' output='raw'][/types]' ne '' )"][types field='alternate-featured-image' size='full' url='true'][/types][/wpv-conditional][wpv-conditional if="('[types field='alternate-featured-image' size='full' url='true'][/types]' eq '' )"][wpv-post-featured-image size="full" output="url"][/wpv-conditional][/wpv-conditional]
#2699223

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL where exactly I can see the issue.

With over the time and new releases of Beaver Builder and Toolset you will have to adjust the things accordingly.

Here is a sandbox site and you can auto-login to it using the following link:
- hidden link

Can you please try to setup a page with above sandbox site that should help me to see the issue and send me the test page link?

#2699276

Thanks Minesh, how do I add our website vendor to follow and help out on this ticket? I would like to add them so they can pick up the conversation and troubleshoot with you.

Here is an archived version of a page where you can see the issue: hidden link

How do I add our website vendor to follow and help out on this ticket? I would like to add them so they can pick up the conversation with you.

Thanks!

#2699670

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

There is no option to add user as you have one site subscription.

Such User Management feature available when you buy either three site or Unlimited Sites subscription.
- https://toolset.com/buy/

Please let me know how we can continue here.

#2700605

Hi Toolset,

Although the same is not happening on the site, the conditional logic seems to not be working on the sandbox site you have provided. Here is an example: hidden link

There I was testing the shortcode conditional logic from your example page, but it doesn't seem to be doing anything there.

#2700680

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please tell me where exactly you added the [wpv-conditional] shortcode as well as what condition you want to check for?

#2702451

Hi Toolset,

When we added the below shortcode to the Beaver Builder Photo widget's src field, it didn't work as expected. After a closer look, we found that the issue started occurring after Beaver Builder added the escaping function in the `FLPhotoModule::get_src()` method `return esc_url( do_shortcode( $src ) );`

Is there any way we can use shortcodes with Beaver Builder?

```
[wpv-conditional if="('[types field='use-full-size-image' output='raw'] [/types]' ne '' )"] [wpv-conditional if="('[types field='alternate-featured-image' output='raw’] [/types]' ne '' )"] [types field='alternate-featured-image' size='full' url='true'] [/types] [/wpv-conditional] [wpv-conditional if="('[types field='alternate-featured-image' size='full' url='true'] [/types]' eq '' )"] [wpv-post-featured-image size=“full” output="url"] [/wpv-conditional] [/wpv-conditional] [wpv-conditional if="('[types field='use-full-size-image' output='raw'] [/types]' eq '' )"] [wpv-conditional if="('[types field='alternate-featured-image' output='raw’] [/types]' ne '' )"] [types field='alternate-featured-image' size='full' url='true'] [/types] [/wpv-conditional] [wpv-conditional if="('[types field='alternate-featured-image' size='full' url='true'] [/types]' eq '' )"] [wpv-post-featured-image size=“full” output="url"] [/wpv-conditional] [/wpv-conditional]`
```

#2702479

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - you can add the shortcodes using shortcodes module or you can create a Toolset Content template (dont assign this content template to any post type) and add your desired shortcodes to this content template and later add the shortcode's or text module to beaver builder and display the Toolset content template.

For example:

[wpv-post-body view_template="your-content-template-slug"]