[Resolved] wpv-post-body combined with wpv-if fails template rendering on views 1.6.4

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 4 replies, has 2 voices.

Last updated by Luo Yang 5 years, 3 months ago.

Assigned support staff: Luo Yang.

Author
Posts
#254949

the following check if post body is not empty used to work until views ver.1.6.4

[wpv-if evaluate="'[wpv-post-body view_template='None']'!=''"]
[wpv-post-body view_template="None"]
[/wpv-if]

The result is the view template not rendering alltogether.

#255270

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Thanks for the feedback, I have been able to duplicate same problem, and put it into our to-do list, our developers will take care of it

#255273

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

It is fixed in Views 1.7, which will be released soon

#259214

Thank you

#259232

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Here is a workaround for it, please try modify your code as below:

[wpv-if evaluate="'[wpv-post-body view_template="None" suppress_filters="true"]'!=''"]
[wpv-post-body view_template="None"]
[/wpv-if]

and test again.

More help:
suppress_filters (opt):
'true' | 'false' (default)
If suppress_filters=’true’, all third party (non WordPress) filters hooked into
the_content filter
will be removed, when retrieving the post body. In certain circumstances, plugins using this filter can add duplicated content to the post body – removing the filters can resolve this problem.
https://toolset.com/documentation/views-shortcodes/#wpv-post-body