Skip Navigation

[Gelöst] Conditionals fail due to added hidden characters to output

This support ticket is created vor 2 Monate, 2 Wochen. 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.

This topic contains 0 Antworten, has 1 Stimme.

Last updated by nicolaS-3 vor 2 Monate, 2 Wochen.

Author
Artikel
#2683382
EXTRA-SPACES2.jpg

Hi,
In a classic view I am trying to test if an event (child) has a parent pub, like this:
[wpv-conditional if="( '[wpv-post-title item='@pub-event.parent']' ne '' )"][wpv-post-link style="color:white;font-size:12;" item="@pub-event.parent"][/wpv-conditional]
[wpv-conditional if="( '[wpv-post-title item='@pub-event.parent']' eq '' )"]show something else[/wpv-conditional]
The first one works fine, the second one never happens. I think I found why, see attached pictures. I have added a test string between two xx and it looks like some hidden characters are added to the output. They are ignored by the first conditional (that just tests if it's ne ''), but they are counted by the second conditional that fails because the output is never blank. Is this a bug ? How can I workaround it ?
Many thanks
Regards
Nicola

#2683443

Hi,
I found out that both these conditionals were nested inside another one, moving them out the result is correct.
Please let me know if you want to investigate further.
Kind regards
Nicola

nicolaS-3 confirmed that the issue was resolved on 2024-02-14 16:31:12.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.