Skip Navigation

[Resolved] WYSIWYG fields not saved correctly in backend when toggling visual / text mode

This support ticket is created 2 years, 1 month 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 9 replies, has 2 voices.

Last updated by davidW-32 2 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2524613

I am trying to: edit WYSIWYG fields in backend

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

I expected to see: fields should be saved correctly in backend when toggling visual / text mode

Instead, I got: especially <p> and <br> tags get often lost when toggling visual / text mode. and this not only on the record (post) that we are currently editing, but on the same WYSIYWYG field of ALL records (posts) of this custom post type

#2525603

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Recently we released the Toolset hot fix version that has few fixes related to wysiwyg field but the issue you are described maybe due to conflict with another plugin or theme or could be another one.

In addition to that - we do not recommend the debug the issue on production sites as it may cause side effect. Here I'm sharing the sandbox site and you can auto-login to it using the following link:
- hidden link

Can you please setup a test case where I can see the issue?

#2525775

I can't access exclusive-ukulele.sandbox.otgs.work - time out. Is this the correct link?

#2526051

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please try again:
- https://exclusive-ukulele.sandbox.otgs.work/?auto=C8UGU8IGUikgyd9NFoGrKKQ1dCv7eJQ2

I just checked its working without any issue.

#2526059

sandbox working now, thanks. I made a test with the field "Description" on speaker page "Chad Price". I noticed that space lines in visual mode are set as " " in text mode. And if I add <p></p> and <br> tags in text mode, they are instantly removed when I switch to visual mode again. Is that the expected behaviour? It seems that the block that I use on my website to display the WYSIWYG field on the template (from ThePlusBlocks) does not use the " " code but uses <p></p> and <br> tags for space lines. What do you suggest?

#2526061

"" "" code

#2526063

"& n b s p ;" code (without spaces)

#2526107

when we enter br tags in text mode, could they please remain and not be removed or replaced with "& n b s p ;" when switching to visual mode? even better: could you use br tags for space lines entered in visual mode instead of "& n b s p ;"?

#2526143

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - that is not from Toolset, its how the classic editor works.

Even if you disable the Toolset and use classic editor to add/edit content with the post body screen - what do you see?

#2526903

I found another solution.