Skip Navigation

[Resuelto] Auto-paragraphs and wpv-autop shortcode not working with some wysiwyg fields

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
The issue here is that the user was getting auto paragraphs added to their field content even though auto paragraph is disabled in their content template.

Solution:

A way to resolve this is by outputting the raw data from the database.

To do this add output='raw' to your types shortcode.

Example
[types field="things-to-note" output='raw'][/types]

This support ticket is created hace 5 años, 4 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Etiquetado: 

Este tema contiene 15 respuestas, tiene 2 mensajes.

Última actualización por Travis hace 5 años, 4 meses.

Asistido por: Shane.

Autor
Mensajes
#1293061

I am trying to:
I have a content template that's displaying a mixture of wysiwyg, number, date and text fields among others for approximately 30+ custom posts.

The majority of posts are fine, though one of the wysiwyg fields in 4 of the posts aren't displaying correctly — no line breaks are being added. It's the same wysiwyg field every time.

When comparing a good post against one that's not displaying correctly, the wysiwyg text is formatted identically in both text and visual modes of the wysiwyg editor.
Replacing the non-working wysiwyg text with the text from the working post makes no difference; line breaks are still not added.

I've tried turning on/off insert auto-paragraphs & wrapping the field in [wpv-auto][/wpv-auto] — no combination of those two solutions makes any difference.

Link to a page where the issue can be seen:
enlace oculto
Under the "Good to Know" tab part way down the page.
Here's an example of an itinerary where the Good to Know content is properly formatted:
enlace oculto

#1293089

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Travis,

Thank you for contacting our support forum.

Are you displaying this page with a content template? If so is it set to disable auto paragraphs ?

Please let me know.

Thanks,
Shane

#1293093

Hi Shane,

Yes I'm using a content template & yes I tried both enabling and disabling auto paragraphs. Also tried with and without [wpv-autop] around the wysiwyg field in the content template.

Travis

#1293137

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Travel,

Could you send me a screenshot of how you wrapped your text with the auto paragraph shortcodes?

Thanks,
Shane

#1293143
Screen Shot 2019-07-16 at 4.42.48 PM.png

Sure, here you go. I can also give you access to our staging server so you can see the code yourself if that helps.

#1293153

fyi the original view shortcode was using the curly braces but I tried using square brackets to see if that would somehow make a difference. It didn't so I just left the square brackets there, in case you're wondering why other shortcodes in the screenshot have curly ones.

#1294019

Hi Shane,

Just checking if you have any ideas or if there's anyone else available to help in the mean time if you're unavailable? Looking to sort this out asap.

Thanks,
Travis

#1294089

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Travis,

I'm currently looking at this for you now.

The forum is a little busy which is why it takes a long time to get on this for you.

Thanks,
Shane

#1294091

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Travis,

Could you provide admin access to the site ?

Thanks,
Shane

#1294125

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Travis,

So the issue is actually just on this post only ? Correct?

#1294137

No, it's also on the following posts:

enlace oculto
enlace oculto

#1294193

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Travis,

I would like to get a copy of this site, because I want to try disabling the non-toolset plugins and see what happens.

Or if its ok to do this on your staging site.

Thanks,
Shane

#1294277

You're welcome to make any changes you need on the staging server — thanks

#1295057

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Travis,

I was able to resolve the issue by doing this.
[wpv-autop][types field="things-to-note" output='raw'][/types][/wpv-autop]

Using the output = 'raw' attribute.

Thanks,
Shane

#1295173

Thanks Shane, that did the trick. Appreciate your help.