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.
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. **
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?
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
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.
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
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.