Skip Navigation

[Resolved] Date conditional stopped working

This support ticket is created 3 years, 1 month 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
- 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 6 replies, has 2 voices.

Last updated by Minesh 3 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2192263
Capture d’écran, le 2021-10-10 à 14.45.39.png

Tell us what you are trying to do?

I have a date field that i want to hide if empty using this code
[wpv-conditional if="( $(date-de-l-inscription-hative) ne '' )" ]
When this condition evaluate to TRUE, i need to display a text
Now, with this field empty or not, the text showed up !

In my image, there is the text AU ( red ) and AVANT LE ( in the grey square )

[wpv-conditional if="( $(date-de-l-inscription-hative) ne '' )" ]
before [types field='date-de-l-inscription-hative' style='text' format='j F Y'][/types]
[/wpv-conditional]

This was working fine for a while and since last upgrade, it won't anymore.

hidden link

#2192577

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please share admin access details so I can review whats going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2193515

Minesh
Supporter

Languages: English (English )

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

I've changed the conditional shortcode as given under:

 [wpv-conditional if="('[types field='date-de-l-inscription-hative' output='raw'][/types]' ne '' )"]
        // ** IF Date de fin de l'inscription hâtive NOT EMPTY please be seen ! ** // [types field='date-de-l-inscription-hative' style='text' format='j F Y'][/types]

Can you please confirm it works as expected now: hidden link

#2193937

Yes this part is working fine!
Why do I have to change the shortcode thought?

Also, I have the same problem with the field date-de-fin in
hidden link

I tried to figure it out but i have not succeed.
When i change anything in the code all the dates disappeared!
Can you still have a look ?

#2194519

Minesh
Supporter

Languages: English (English )

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

I've changed the conditional shortcode as given under:

[wpv-conditional if="( '[types field='event-date-de-debut' output='raw'][/types]' ne '' ) AND ( '[types field='event-date-de-fin' output='raw'][/types]' ne '')"]

Can you please confirm it works at your end as well.

#2195055

Hi and thank you.
This worked, I will implement this RAW date anywhre that is required!

Can you tell me why do I have to use RAW now?

#2195481

Minesh
Supporter

Languages: English (English )

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

I'm not sure but may be you have many nested conditional statements that is the issue and to get raw value from database we can use the shortcode [types field='event-date-de-debut' output='raw'][/types]' ne '' ) AND ( '[types field='event-date-de-fin' output='raw'][/types] that is more appropriate.