Skip Navigation

[Resolved] conditional block don’t shows even if debug information is activated

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user has created a conditional block on datetime field using "<=". Solution:
This is a bug that we escalated to our developers and will be fixed in the future.
As a workaround, we can use the "lte" operator. Or we can use ">" with negation, which is equivalent to "<="

0% of people find this useful.

This support ticket is created 3 years, 6 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9: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: Africa/Casablanca (GMT+01:00)

This topic contains 6 replies, has 2 voices.

Last updated by Jamal 3 years, 4 months ago.

Assisted by: Jamal.

Author
Posts
#1797625

conditional block don't shows even if debug information is activated

htaccess: lurumlarum:loeffelstiel66 (please remove after reading)

I am trying to:
conditional out put in a view by "<=" of a custom field (date time) of the current post

even the debuginformation don't shows up if i its enabled

(
    [if] =>   ( ( $(wpcf-anmeldeschluss-veranstaltungen) <= TODAY() ) ) 
    [debug] => true
)

if is set the relation to">=" the debug information shows up but the values don't
hidden link

I use the same condition with "<=" at the single page and there it works fine.
hidden link
see debug information at the right side under "kontakt" button

if i change the condition to an other value like:

(
    [if] =>   ( ( $(wpcf-anmeldestatus-veranstaltung) = 'ausgebucht' ) ) 
    [debug] => true
)

it works like it should.

#1797697

Still testing at a clean testserver ...

#1797713

So now i tested it an I could reproduced the problem!
hidden link

So we have a bug?
Or is it not possible to use a conditional output by a custom field of the current post type insed a view?!

#1798693

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

If the condition debug info does not appear, it means that there is an error with the condition. If you are using the legacy editor, please check if using "lte" instead of "<=" and wrapping 'TODAY()' in single quotes will help:

[wpv-conditional if="( $(wpcf-anmeldeschluss-veranstaltungen)  lte 'TODAY()' )"]
<p>Condition evaluated to true</p>
[/wpv-conditional]

Otherwise, please allow me temporary access to your test site to check this closely. Your next reply will be private to let you share credentials safely.

#1801915

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for the credentials and the provided tests.

I edited the condition on "<=" and used "lte" in the advanced editor, then saved. It worked in the frontend, but it crashed the view on the backed. Check this screenshot

I run another test on our platform and changing "<=" to "lte" did not crash the view for me, maybe that's a different issue on your website that we can check later.

And I have also added a view, that uses another workaround, using ">" and evaluating to false, which is equivalent to "<=" and that worked without issues, you can check it at the bottom of this page hidden link

Please let me know if ">" evaluating to false is a viable workaround for you?

I have escalated the issue with "<=" to our 2nd Tier and I'll keep you posted as soon as I have any news.

#1802017

Hi Jamal,

thx for the feedback. I tried that work around at my project. Worked with ">" but not with ">=", "<=" and "<".

#1862781

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Just want to let you know that the last update, published yesterday, has had some improvements on the user interface and now generates conditions based on letter operators(gt, gte, lt, lte) instead of symbols(<,>,<=, >=) as they are treated as HTML entities by WordPress.

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