Skip Navigation

[Resolved] Using blocks, insert data, extra added inside span

This thread is resolved. Here is a description of the problem and solution.

Problem:

If the custom field is 'multiple lines', and extra

tag is introduced.

Solution:

You can changed the outer container to a HTML div tag.

Relevant Documentation:

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by terryE 2 years ago.

Assisted by: Luo Yang.

Author
Posts
#2340271

When using Gutenberg editor > page template > existing paragraph with a class > insert toolset data

Extra <p> tags are inserted. Have tried adding the same code function.php, like the old views had to do, but still there.

Inspecting the code view in the editor...

<p class="intro"><span data-provider="__current_post" data-source="toolset_custom_field|field-group-for-events" data-field="event-short-description" data-uniqueid="3" class="tb-inline-field"><p>We look forward to welcoming you to our Curry Club on Friday 2nd December at The Spotlight Bar & Restaurant.</p> </span></p>

On the front end I get this...

<p class="intro"></p>
<p>The data is here and should be inside the above</p>

#2340297
extra-p.jpg

Hello,

I assume we are talking about these:
in a paragraph block, with below settings:
1) custom CSS class name "intro"
2) Dynamic Sources-> one custom field

I have tried it in my localhost with a fresh WP installation + the latest version of Toolset plugins, it works fine, I don't see any extra HTML <p> tags, see my screenshot extra-p.JPG

Is there any step missing? Please provide detail steps to reproduce the same problem, thanks

#2340371

Toolset Version 3.4.15
Toolset Blocks Version 1.6.2

Template > Used on Product Single - not sure if that helps or not...

#2340867

I can't produce the same problem in my localhost, please provide your website database dump file in below private message box, you can put the package files in your own google drive disk, share the link only, I need to test and debug it in my localhost.
https://toolset.com/faq/provide-supporters-copy-site/

#2341623

ok, have had to revert back to using views, I didn't realise views and blocks were not compatible, and I have lots of reports, that I am not re-writing! 🙂

Anyway, I found a pattern.
If the custom field is 'multiple lines', and extra <p> tag is introduced.
If the custom field is 'single line', it is ok.

I guess having p on multiple lines is kinda the right thing to do, so just changed my outer container to a div, so we are all good. Sorry for wasting your time and thanks for your help! 🙂

#2341659

My issue is resolved now. Thank you!

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