Skip Navigation

[Resolved] Conditionals fail due to added hidden characters to output

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.

This topic contains 1 voice and has 0 replies.

>
Author
Posts
#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