Skip Navigation

[Resolved] Fields and Text HTML view is broken

This support ticket is created 2 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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 8 replies, has 2 voices.

Last updated by dominiqueM-3 2 years, 6 months ago.

Assisted by: Nigel.

Author
Posts
#2375183
toolset-fields-and-text-block-html-view.jpg

Hello,

For some time now (I don't remember for which version of Toolset Blocks the problem started appearing) the HTML view of the Fields and Text Block no longer works correctly.
Code selection and modifications in the code are made almost impossible.

I'm experiencing the issue in both Chrome and Firefox browser.

Best regards

#2375271

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

On my own test site (with the latest plugin versions and WordPress 6) I don't experience any such issues, which leads me to think there is something else interfering on the page with your site.

Can you check for any conflicts before going any further?

Disable all plugins except Toolset, and switch theme to twentytwentyone. Then try editing the content of a Fields and Text block again. If the problem no longer appears then you should be able to determine the source of any conflict that triggers the problem by a process of elimination.

Let us know what you find.

#2375283

Hello Nigel,

Thank you for your reply.

The issue seems to occur with GeneratePress theme (3.1.3). It's a theme that I enjoy and use often.

Best regards

#2375307

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, I can see the problem when I activate GeneratePress.

Let me take a closer look, and I'll get back to you.

#2377169

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Sorry, I don't have any news yet, I just wanted to point out, ahead of the weekend, that you can use the Custom HTML block as an alternative to the Fields and Text block. You do have to enter the shortcodes manually, but if you go to Toolset > Settings and enable the Toolset Shortcodes link in the admin toolbar you can use that to generate the shortcodes and then paste them into the Custom HTML block as required.

#2378821

Hello Nigel,

Thanks for the advice.

Best regards

#2380401

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I managed to isolate the cause of the problem: the GeneratePress theme injects CSS styles which break the formatting of the codemirror instance used to provide the code editor of the Fields and Text block.

I've escalated this to the developers—hopefully they can produce a permanent fix—but in the meantime as a workaround you can add a little code snippet that adds some inline styling in the document head to override the relevant GeneratePress style declaration.

You can add the following code as a snippet at Toolset > Settings > Custom Code:

function ts_gp_style_override() {
    echo '<style>.editor-styles-wrapper .block-editor-block-list__layout pre {margin-bottom: 0!important; padding: 0 4px!important}</style>';
}
add_action( 'admin_head', 'ts_gp_style_override', 11 );

I suggest we close here, and you can subscribe to the comments in the erratum about this issue for further updates:

https://toolset.com/errata/fields-and-text-block-formatting-broken-by-generatepress-theme/

#2380435

Hello Nigel,

I tested the workaround.
It works for me.

Many thanks

#2380437

My issue is resolved now. Thank you!