Skip Navigation

[Escalated to 2nd Tier] Extra p and br tags added when using Wysiwyg field type

This support ticket is created 3 years, 10 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.

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: Africa/Casablanca (GMT+00:00)

This topic contains 9 replies, has 3 voices.

Last updated by Jamal 3 years, 10 months ago.

Assisted by: Jamal.

Author
Posts
#1652743

I am having an issue with a content template built with toolset and beaver builder. Whenever I add a Wysiwyg field type which contains any content in it it is adding br and p tags erronioulsy after the other elements on the page when rendered in the front end. If I add it as raw output this doesn't happen however I loose the formatting I want to keep on the field.

I did search the support forum and found "Line breaks added to beaver builder single content template" which seems to be the same issue but it was closed on request before a resolution was found.

hidden link this page is an example of an event with a description causing the issue

hidden link this is another page using the same content template but with an empty description and the issue does not occur.

Thanks
Kieran

#1652881

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello Kieran and thank you for contacting the Toolset support.

I wonder if you are not encountering the bug described by Beda in the following reply, referring to a WordPress bug.
https://toolset.com/forums/topic/content-template-adding-extra-p-and-br-tags-with-beaver-builder/#post-540027
https://core.trac.wordpress.org/ticket/40021

If it is not the case, I'll need to take a closer look at your admin area to understand the issue better. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#1655963

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello Kieran! My apologies for the late reply, I do not work on Mondays.

Please check this screenshot hidden link
In my opinion, the generated content(br tags inside 4 paragraphs) is expected. Can you elaborate more on the issue and explain what would you expect? Can you record a short video using Loom or Screencastify where you explain what would you expect?

#1656057
Drawing2.png
Drawing1.png

No problem Jinal.

I'll try to explain it a bit better. The content that is displayed in the "Event Description" section of the page is a WYSIWYG toolset field type. Although the br and p are rendering correctly in that content the issue is that when there is any content in that field other br and p tags appear on the rest of the elements on that page. I have attached a side by side screen shot of the register button with inspect on from two different event pages using the same content template to view them. The difference is that I have removed any content (but not the field) from the event description on the one on the left. I also have a side by side of the full page so you can see the additional spacing added on the one with the event description. The additional breaks appear to be getting added to anything on the page regardless of if it is a short code or just static text or icons

#1656153

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

hidden link
admin / admin123

Thank you very much! Now I can see the issue of the
tags inside other elements, especially the register button.
The page presents also empty <p> paragraphs, probably because of the bug https://core.trac.wordpress.org/ticket/40021

As a workaround for both issues, you can add the following code:

jQuery(function($){ 
  $('.fl-button-has-icon br').remove();  // <== fixes the <br> tags around the register buttons
  $( 'p:empty' ).remove();                          // <== removes the empty <p> tags (17 in the example page)
})

In order to escalate this to our developers we'll need to:
- Reproduce it on a clean install: This will confirm it is a bug and I can escalate it directly to our compatibility team.
- If not reproducible on a clean install, it can be caused by another component(theme/plugins/server) on your website, or an edge case present with your current data.

To confirm the first hypothesis, I created a new installation on our platform and registered Toolset on it.

Please login with the credentials in my previous private reply(June 9, 2020 at 7:04 pm), install the beaver builder, and create a minimal content template that can demonstrate this issue. You can install any other Toolset plugin from "Plugins->Add New->Commercial(tab)".

If the issue is not reproducible, we'll migrate your website into our platform to exclude any possible issues related to the server and also to test in a minimal setup. If the issue is still present, I'll escalate the ticket to our 2nd Tier for advanced debugging and eventually escalation to developers.

I hope this is ok with you! Looking forward to your reply.

#1657223
2020-06-10_17-07-27.jpg

Hi Jamal

I have completed that requested now and am seeing the same behavior in the test site.
Steps I took
• Installed beaver builder pro
• Created a custom post type of Events
• Added a field group for Events with 2 fields a WYSIWYG (description) and a text field (registration details)
• Created a content template with a registration button including icon, an icon field, a text field which includes both static text and the registration details toolset field, and a 2nd text field that includes the WYSIWYG description
• Created two events one with a blank description (WYSIWYG) one with a description

Result
Both pages load differently the one with the description is adding additional brs to the other elements in the content template the one with the blank description is not

Link to page with blank description hidden link

Link to page with a description hidden link

#1657375

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Thank you very much for your collaboration.
I escalated the ticket to our 2nd Tier for further analysis and eventually escalation to our compatibility team or our core developers.

I'll get back to you as soon as possible.

#1657377

No problem. Thanks Jamal

#1658253

Minesh
Supporter

Languages: English (English )

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

Jamal is on holiday today. He will get in touch with you as soon as he will back to work.

I see Jamal reported the issue to our next level support. Please hold on for further udpates.

#1660051

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Our 2nd Tier has escalated this issue to the developers. I'll get back to you as soon as we have something to share.

Thank you for reporting this issue.