Skip Navigation

[Resolved] toolsetCommonEs styleToHead ()

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 5 replies, has 3 voices.

Last updated by Waqar 2 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#2509607
Capture.JPG

I am using Elementor and Formidable Forms. One of the forms I am running is a quiz which gives a result based on the person's answers. There is the option to include a Content Template so I have inserted a Content Template into the outcome view, and it comes up with this output on the page:

LnRiLWZpZWxkW2RhdGEtdG9vbHNldC1ibG9ja3MtZmllbGQ9ImY5OWFlYzRhOWUzZDM1ZDE3NGU4YTcyMzc1N2E2NDFhIl0geyBjb2xvcjogcmdiYSggNDYsIDU5LCA5NiwgMSApOyB9ICBAbWVkaWEgb25seSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDc4MXB4KSB7ICAgfSBAbWVkaWEgb25seSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDU5OXB4KSB7ICAgfSA=
toolsetCommonEs.styleToHead()

The content template displays correctly but has this extra text displayed on screen.

I have disabled all plugins except Toolset and Formidable Forms - it still shows up.

Any ideas, please? I have attached a screenshot. I am also happy to give you access.

#2509689

Nigel
Supporter

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

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

Hi there

That relates to styling information from the content template when designing the template with blocks.

If you are not using blocks to style the template and you have inserted the template using shortcodes (specifically the wpv-post-body shortcode) then you should be able to prevent these encoded styles from appearing by by adding the attribute suppress_filters="true" to the wpv-post-body shortcode.

If you are using blocks then it becomes problematic, I guess the text is appearing because of the unexpected context it's being used in, but perhaps you are working with shortcodes...

#2511803
screenshot front end.JPG
screenshot formidable forms outcome.JPG
screenshot content template.JPG

Hi Nigel

I am a bit confused as I did both of those things.

I created the content template using blocks then inserted it using a shortcode.

Please see the attached screenshots of:

1. Front end error displaying
2. Formidable forms outcome (which produces the output for 1.) with the shortcode
3. My content template styled with blocks

Not sure how I could do this any differently but you may have suggestions.

#2512269

Hi,

Thank you for sharing these details.

Were you able to try the content template shortcode 'wpv-post-body' with the suppress_filters="true" attribute, as Nigel suggested?
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-body )

Here is the shortcode that you currently have in the screenshot from the Formidable forms.


[wpv-post-body view_template="content-template-for-medshed-careers" item="5193"]

Here is how it will look like with the suppress_filters="true" attribute:


[wpv-post-body view_template="content-template-for-medshed-careers" item="5193" suppress_filters="true"]

If that doesn't work, then the only option would be to use a content template that is created using the classic/legacy editor and not the blocks editor.

I hope this helps and please let me know if you need any further assistance with this.

regards,
Waqar

#2512283

Thank you Waqar. No, I hadn't tried that, as Nigel said I should try that if I'm not using Blocks.

However, despite using Blocks, I have just tried adding the suppress_filters="true" attribute and it has fixed the issue. Is this an acceptable workaround, do you think? Or is it just "covering up" an issue?

Would it be preferable to use the legacy editor, or will that eventually be phased out?

#2513759

Thanks for the update and glad that this is sorted.

We generally recommend not mixing the content from different page/content builders. For example, if your primary page/content builder is Elementor, it is better to use the classic/legacy content template, to include any content template within it.
( the blocks-based content template is a better fit for the blocks-based Gutenberg environment ).

As for this particular case, using the suppress_filters="true" attribute should be a perfectly safe and acceptable workaround.