Skip Navigation

[Resolved] Content template adding extra p and br tags with beaver builder

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

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 9 replies, has 3 voices.

Last updated by Beda 6 years, 10 months ago.

Assisted by: Beda.

Author
Posts
#536067

I am trying to: create a content template using Beaver Builder and Views

I visited this URL: hidden link

I expected to see: My page appear as expected

Instead, I got: Extra paragraphs and breaks added to certain elements
this learn more button: hidden link
the contact widget: hidden link
the newsletter signup button hidden link
(the contact and newsletter widget appear correctly on all pages, just not on this post type)

#536071

Also, I do have paragraph breaks set to manual already

#536220

Okay this looks like a compatibility issue. May I request access to your wp-admin area to create a clone of your site? This way I can make modifications locally without affecting your live site. I have enabled private reply fields here.

#538255

Hi, I just made a clone of your site and ran some tests locally. I can see the issue with this particular content template, but if I create a new Content Template starting with the Property Layout the button issue is resolved as well as the Newsletter signup widget alignment.

If I add a new MailChimp Subscription form to that new Content Template, the spacing issue there seems to be resolved...So my guess is that somehow this existing Content Template became corrupted. I'm not exactly sure how to replicate that issue in order to report it as a bug. Can you give me any more information about how you created the Content Template, when you activated the Page Builder, when you added the button element, etc? Did you enable and disable the Page Builder, or anything suspicious you remember about the process?

On the other hand, it might be easiest to simply recreate this Content Template rather than try to figure out an edge case scenario that could have caused this. If you'd like to try that route, I recommend recreating this Content Template and applying the new Content Template to your Property posts and archive. Then keep an eye on these spacing issues as you create new Content Templates. If the extra markup returns, or begins to show up in another Content Template, then we'll know there's a repeatable issue to investigate.

How would you prefer to proceed?

#538543

I just recreated the entire content template and I am still seeing the same issue

#538562

Interestingly another site we are working on is having the same issue. hidden link

I thought maybe it was powerpack or ultimate add-ons but deactivating those plugins does not resolve the issue either.

#538671

I've rebuilt the content template again and the issue of extra breaks and returns happens when a field is added to the page. Everything works fine until I add a custom field to either a Text module or in the HTML module or using the red + that shows up beside some fields in modules to insert a field or view.

#538713

Hi just a quick update to let you know I'm still working on this. I'm able to replicate the issue when I add a custom field to the Content Template in a Text Editor cell, but only on the clone of your site. When I start from a clean installation, I'm not seeing the same issue. So I'm doing some more investigation at the moment to help narrow down the differences that are related to the problem. Please stand by and I will update you shortly.

#538745

I haven't been able to replicate this yet on a clean installation, so I'm reporting this to our 2nd tier support team as an exception. They will be able to take a closer look and see if I'm overlooking an obvious solution. Hopefully they will have some feedback for us early tomorrow. I'll let you know what I find out as soon as I hear something.

#540027

Hello, Heather, this is Beda.

First, I would like to ask you to update the Plugins, especially the affected Beaver builder.

Then, I would like to point you to an issue due to WordPress:

What happens here is that whenever two or more shortcodes are inserted in the editor, any shortcodes, the editor adds a <p> element and encloses those two shortcodes inside that <p>. In our case, each shortcode results in <div>, which actually leads to something like

This is just one case description, and it sounds quite like you have here.
This is not a Toolset or Beaver Builder issue but a WordPress issue:
https://core.trac.wordpress.org/ticket/40021

This below can be a solution:

$('p').each(function(index, item) {
    if($.trim($(item).text()) === "") {
        $(item).slideUp(); // $(item).remove(); slideUp looks nicer
    }
});

Now the strange thing is, as example the "Learn more" button, in the BB editor, has no redundant br tag, but it has it in the front end.
But it also does not hold any Custom Field.
So, to understand this, you say the redundant breaks appear when you add a Field anywhere, but they appear not where the field is inserted, instead, in other BB elements?

I think this is due to that WP Bug mentioned, can you try to add the code above?

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