Skip Navigation

[Resolved] WYSIWYG Editor Won't Save Content…

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
- 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/Karachi (GMT+05:00)

This topic contains 6 replies, has 2 voices.

Last updated by Waqar 1 year, 11 months ago.

Assisted by: Waqar.

Author
Posts
#2310665

I am trying to:
https://toolset.com/forums/topic/wysiwyg-fields-doesnt-save-any-text/
https://toolset.com/errata/visual-tab-of-wysiwyg-fields-may-not-initialize-correctly-appear-not-to-save-data/

If I use the code editor (text) it will save, but not the WYSIWYG editor (visual). When you make a change in the WYSIWYG and click update, the page will refresh and say it's been updated, but no change will be visible either on the front end or in the editor.

Link to a page where the issue can be seen:
N/A

I expected to see:
Information that is changed in the WYSIWYG editor to be saved after clicking update.

Instead, I got:
Information not saved after changing it in the WYSIWYG editor and clicking update.

#2310967

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

Can you please check if the "Editor" (body content area) option is enabled in the post type's settings?
( example screenshot: hidden link )

If not, can you enable it and see if it has any effect on saving the content in the visual tab of the WYSIWYG field?

regards,
Waqar

#2311489

Hi Waqar,
Thanks for the quick response!

I turned Editor on and as expected the Editor section appeared at the top of the CPT in the backend.

I scrolled down to my custom WYSIWYG editor, made a simple change with 'visual' and the change was apparent on update, where before it had not been.

I turned Editor back off and retested. Sure enough it stopped working again.

While this does in fact work, having the main editor in there will confuse the content editors who will probably use it for the wrong info, so I can't leave it on as a solution.

Any fixes for that?

#2311937

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for confirming it and this limitation of the WYSIWYG field is already reported to the concerned team.

For now, you can include some custom CSS code on the post edit screen to hide the main content editor section, using some PHP code.

For example, suppose you'd like to hide the content editor from the post type with slug 'book':


add_action('admin_head', 'my_custom_admin_CSS');

function my_custom_admin_CSS() {
	$screen = get_current_screen();
	if ( $screen->id == 'book' ) {
	   echo '<style> #postdivrich, .is-root-container.block-editor-block-list__layout {display:none;} </style>';
	}
}

The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through the active theme's "functions.php" file.

#2312405

Thanks Waqar. I'd rather not add any more php for something temporary. I'll just advise the content editors to add their content into the (text) html side and I'll clean up when needed.

How long do you think the patch will take? If it's something like two weeks, maybe we can leave this ticket open so I can check back in later.

#2312855

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I'm afraid, I don't have a time estimate for this at the moment, but, I can update you through this ticket, once a fix is released.

Personally, I don't see any drawback in including the code snippet and you can even leave it after this is fixed.
(you'll only need to remove it if you do decide to use the content body editor in the future)

#2369341

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I would like to inform you that the latest Toolset Types plugin (version 3.4.16) is released and contains the fix for this issue.
( ref: https://toolset.com/download/toolset-types/#changelog )

Please update all the Toolset plugins to the latest versions and let us know in case the issue persists.

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