Skip Navigation

[Resuelto] Conditionals in WPBakery module are not working

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem: I am trying to use Conditional HTML in a WPBakery module, but they don't seem to be working as expected.

Solution: It appears that there is a problem with the shortcode builder, and it is inserting nested single quotes. Our developers are aware of the issue and are working towards a resolution. In the meantime, nest double quotes and single quotes to prevent these conditional failures.

...
...
...
This support ticket is created hace 5 años, 8 meses. There's a good chance that you are reading advice that it now obsolete.

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Etiquetado: 

This topic contains 4 respuestas, has 2 mensajes.

Last updated by Christian Cox hace 5 años, 8 meses.

Assisted by: Christian Cox.

Autor
Mensajes
#954633
toolsets-4.png
toolsets-3.png
toolsets-2.png
toolsets-1.png

I am trying to: I try to show a conditional field in a content template.

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

I expected to see: I indicate that if the field of the product is one, the field should be shown

Instead, I got: The field is not displayed

#954674

Hi, in your conditional code, try replacing the single quotes around 'cosmetico' with double quotes, like this:

{!{wpv-conditional if='( $(wpcf-formato-de-presentacion) eq "cosmetico")'}!}...
...
{!{wpv-conditional if='( $(wpcf-formato-de-presentacion) ne "cosmetico")' evaluate='false'}!}...

Let me know if that does not resolve the issue.

#954692

Thanks Christian for your help. The solution surprises me because that type of quotes puts it by default Toolsets. It had not occurred to me to try other quotes.

Tell me please, if it is a Toolset error and it will be solved or I should always put the quotes from now on.

regards

#955528

Yes, it's unusual that the code generated by the GUI is not working. I have reported this issue to my 2nd tier support team. It may be escalated as a bug, or as a compatibility issue. Stand by, and I will let you know what I find out.

#1076315

Hi, I wanted to let you know our developers will include a permanent fix for this problem in the next release, Views 2.6.4.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.