Skip Navigation

[Resolved] Carriage returns in Back-End Text Area Field disappear in Front-end

This thread is resolved. Here is a description of the problem and solution.

Problem: I am displaying the value of a WYSIWYG field in a Content Template, but line breaks I have included in the post editor WYSIWYG are not being shown on the front-end of the site.

Solution: Apply the "suppress_filters" attribute to prevent this behavior.

[types field='itinerary-details' suppress_filters="true"][/types]

Relevant Documentation: https://toolset.com/documentation/customizing-sites-using-php/functions/#wysiwyg

This support ticket is created 6 years, 6 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.

Our next available supporter will start replying to tickets in about 1.47 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 5 replies, has 2 voices.

Last updated by Maximiliano Mendieta 6 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#579987

I am trying to:
View the texts entered in the back-end with the same carriage returns in the front-end

Link to a page where the issue can be seen:
hidden link

I expected to see:
Carriages return in the ITINERARY DAY BY DAY text

Instead, I got:
All the text without carriages returns, all the text lines one after another as it was written in a same line.

It started happening when I upgrade the WP Toolset with the laste version.

#580046

Hi, can you please try the following troubleshooting steps?
- Temporarily activate a default theme like Twenty Seventeen and deactivate all plugins except Types, Views, and Layouts. If you need to hide your site with a plugin like Maintenance Mode, that's fine. Test the multiline field again.
- If the problem was resolved, activate your theme and plugin files one by one until the conflict is revealed.
- If the problem was not resolved, please share a screenshot of the Layout or Content Template in wp-admin where you have inserted this field shortcode. I would like to see how it's configured.

#580660
content-template.jpg

Hi Christian,
Well...we implement a Test site with Duplicator so we can work safelly: hidden link

Now... we followed your instructions "Temporarily activate a default theme like Twenty Seventeen and deactivate all plugins except Types, Views, and Layouts. If you need to hide your site with a plugin like Maintenance Mode, that's fine. Test the multiline field again."
....and the issue persists you can check online: hidden link (please find "Day 1 – Ushuaia, Argentina" and then on)

I attach the screenshot you ask.
Regards

#580881

Thanks for the screenshot. Please scroll down and look at the Settings for this Content Template. The option "Auto-insert paragraphs" should be selected here. If it is not, please select it and test the results. If it is already selected, then I'll need to take a closer look in your wp-admin area to see what's going on. I will enable private reply fields so you can share your login credentials if necessary.

#581273

Hi, in your Content Template I have added the "suppress_filters" attribute to your WYSIWYG field shortcode:

[types field='itinerary-details' suppress_filters="true"][/types]

This will suppress filters applied by other third party plugins and your custom theme when displaying the contents of this field. Please check it out and let me know if the problem is not resolved.

Documentation for suppress_filters and other attributes:
https://toolset.com/documentation/customizing-sites-using-php/functions/#wysiwyg

#581783

Hi Christian,

Thanks it works! Issue resolved.
Thanks for your assistance.

Regards from Buenos Aires!

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