Skip Navigation

[Resolved] Apply suppress_filters to visual editor cell

This support ticket is created 7 years, 9 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: Asia/Hong_Kong (GMT+08:00)

This topic contains 7 replies, has 3 voices.

Last updated by rachelW-3 7 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#473469

My original thread was closed, was away on holidays. Happy new year!

Original thread: https://toolset.com/forums/topic/duplicate-content-on-form-submission/

Did some more troubleshooting and another plugin's filter is hooked into the_content filter when retrieving the post body.

How can I apply

suppress_filters='true'

to visual editor cells to solve this issue?

#473810

Dear Rachel,

You can re-open the your closed thread:
https://toolset.com/forums/topic/duplicate-content-on-form-submission/

For the question:
How can I apply suppress_filters='true' to visual editor cells to solve this issue?
The attribute suppress_filters='true' is for the Views shortcode [wpv-post-body], if you are using Views shortcode [wpv-post-body], you can add the attribute in the shortcode, see our document:
https://toolset.com/documentation/views-shortcodes/#wpv-post-body

If you are using custom WYSIWYG field, you can also add the attribute suppress_filters='true' into Types shortcode, see our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#wysiwyg

suppress_filters:
'true' | 'false' (default)
If suppress_filters=’true’, all third party (non WordPress) filters hooked into the_content filter will be removed, when retrieving the WYSIWYG content. In certain circumstances, plugins using this filter can add duplicated content to the WYSIWYG content – removing the filters can resolve this problem.

#474070
Screen Shot 2017-01-05 at 9.15.00 AM.png

Here is the issue: on some pages (esp. after form submission), some areas of WP-Types are overridden by another plugin. While this can be worked around for a Views cell with

suppress_filters='true'

, there is a cell type in WP-Types (Visual editor cell) that needs

suppress_filters='true'

.

I've taken a screenshot of what I mean.

#474332

There isn't such a built-in feature that can apply suppress_filters='true' to visual editor cell. If you agree, we can take it as a feature request.

Currently, You can try this,
1) Replace the visual editor cell with content template cell, and test again. Since I don't have the plugin you mentioned above, so I am not sure if it will work.
2) Ask help from the author of the plugin which conduct this problem:
some areas of WP-Types are overridden by another plugin.

#474636

Great! Would love if the wp-types team can apply the suppress_filters function to visual editor cells! Can you point out to me where in the code WP-Types allows 'suppress_filters' for Views so that it can be applied to visual editor cells?

I tried your suggestion "1) Replace the visual editor cell with content template cell, and test again." as follows: copied the visual editor cell contents into a new content template. Opened the layout and replaced the visual cell editor with the new content template. Reloaded the front-end of site and same issue.

In the previous thread, Beda was on the right track. Previous thread: https://toolset.com/forums/topic/duplicate-content-on-form-submission/

Any more suggestions? or where in the wp-types code can we apply suppress_filters to the visual editor cells?

#475167

Since this problem is a compatibility problem: between the Layouts plugin and another plugin of your website, you did not provide any more information for it, I can not duplicate same problem in my localhost, so I can not provide more suggestions, as I mentioned above:

1) If you agree, we can take it as a feature request.
2) Ask help from the author of the plugin which conduct this problem:
some areas of WP-Types are overridden by another plugin.

#475383
#551643

So I ran across a very similar problem, not just with Visual Editor cells but also with placing content templates directly in a layout. The only cell types - that I was using - that seemed untouched by the duplicate content were image and menu cells. So i did more testing.

I found that rather than using the visual editor if I used a 'single widget' and used a text widget I could add text directly or WP types shortcode with no duplicated content!!!

Granted you don't get pretty colored hints like you do in the visual editor but this took care of all the issues I had with duplicate content, whew! Hope this helps someone else (or WP Types further implement suppress features functionality.)

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