Skip Navigation

[Résolu] Divi Builder adding classes around Content Templates

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
When I render content in a View's loop with a Content Template and the content rendered is designed with the Divi Builder, but the Content Template with which I design the Loop output is not, then it seems Divi Builder adds the following HTML around the output of the Content Template:

<div id="et-boc" class="et-boc"
<div class="et_builder_inner_content et_pb_gutters3">

Solution:
This is Divi Builder injecting it's HTML at the_content() filter no matter when or where it's rendered.

The issue can be solved by using Toolset's inbuilt feature to unallow 3rd parties filtering the content when using Content Templates.
This can be done by passing suppress_filters="true" to the template:

[wpv-post-body view_template="loop-item-in-your_view" suppress_filters="true"]
This support ticket is created Il y a 4 années et 9 mois. 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
- - 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 20 réponses, has 4 voix.

Last updated by Beda Il y a 4 années et 8 mois.

Assisted by: Beda.

Auteur
Publications
#1295383

Any updates or solution on this -> https://toolset.com/forums/topic/question-about-very-strange-wrapping-of-of-views-template-in-divi-3-10-1/

<div id="et-boc" class="et-boc"
<div class="et_builder_inner_content et_pb_gutters3">
"Here is the Toolset Views shortcode output"
</div>
</div>

Using toolset views generated shortcode in a page template designed with divi builder layout.

#1295425

Hello,

According to the thread you mentioned above:
https://toolset.com/forums/topic/question-about-very-strange-wrapping-of-of-views-template-in-divi-3-10-1/

After many user complaints about side-effects it is expected to be removed in subsequent Divi versions.

It is Divi builder added the extra HTML div tags, the problem is in Divi builder side. It seems fixed in new version Divi builder, have you tried the latest version of Divi theme?
And you can also check it with Divi support:
hidden link

#1295427

hi im using the latest divi and toolset but the extra divs are still being generated despite using views shortcode (not using divi builder) in a divi builder layout page

#1295491

I have searched it in Views plugin source codes, but can not find related codes Views plugin file, so I don't think the problem is in Views plugin, did you get any feedback from Divi support?

Since it is a compatibility problem, if you need to locate the problem source, please provide a copy of your website, also point out the problem page URL, where I can see the extra HTML div tags, I need to test it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1297783

hi, we've confirmed in my case, the extra divs only happen when inserting a views shortcode is placed within the divi builder layout.

#1298391

Minesh
Supporter

Languages: Anglais (English )

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

Luo is on vacation. This is Minesh here and I'll take care of this ticket. Hope this is OK.

As there is no debug information shared with this ticket I do not know what Divi theme version you are using and where exactly you placed the view.

I checked the duplicator you shared but its corrupted. It says:

Archive config file not found in dup-installer folder.

Can you please share exact steps that should help me to reproduce the issue or share correct duplicator package where I can see the issue.

I have set the next reply to private which means only you and I have access to it.

More info:
=> https://toolset.com/faq/provide-supporters-copy-site/

#1299617

Minesh
Supporter

Languages: Anglais (English )

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

Ok - thank you. I see you added the view using the divi builder plugin. Please allow me to test this further and I will get back to you by tomorrow as soon as I know more.

#1300431

Minesh
Supporter

Languages: Anglais (English )

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

Ok - I checked with latest Toolset plugins and I do not see the extra divs added as you claim as per your screenshot.

We just published a new release for a bunch of Toolset plugins. We always recommend running your site with latest stable release plugin version.

*** Please make a FULL BACKUP of your database and website.***
Can you please try to update all Toolset plugins to the following version and try to resolve your issue.
- Types 3.3.3
- Views 2.9
- Forms 2.5
- Layouts 2.6.1

You can download the latest plugin release from your accounts page:
=> https://toolset.com/account/downloads/

Can you please update ALL Toolset plugins and check - if this issue persists. I also checked by installing the OceanWP theme and almost copy your views content as well as CSS and javascript but I do not able to reproduce this issue.

#1300433

hi Minesh, that's wierd coz the extra divs are still there, as per screenshot attached. all the plugins are updated to latest and that domain is my testing site for this issue also. -> will be doing a screencast now -> hidden link -> the whole thing is just a views shortcode (domain.com//wp-admin/admin.php?page=views-editor&view_id=17) in divi builder layout

P.s - only using types and views, no layouts nor forms

#1300449

Minesh
Supporter

Languages: Anglais (English )

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

I understand but there must be something missing then or the page with Divi builder you are using could be corrupted HTML.

I installed the Divi builder + OceanWP theme and created a page with divi builder. I created the view as well which is using content template inside the loop and used the same HTML (content) you added to that template and added the view to code module using divi builder but I do not see those extra divs.

- What if you try to deactivate all third party plugins and check?
- What if you try to create a new page when all third-party plugins are inactive (only Toolset plugins + Divi builder plugin active) and add the view?

#1300451
1.png

hi now theme is 2019, activated plugin is only types, views and divi builder.. all latest versions.. pls see screenshot

#1300469

Minesh
Supporter

Languages: Anglais (English )

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

This is really strange as I could not able to reproduce this.

As you can see, the following code generated by view for me.

<div class="et_pb_column et_pb_column_4_4 et_pb_column_1  et_pb_css_mix_blend_mode_passthrough et-last-child">
				
				
				<div class="et_pb_module et_pb_code et_pb_code_1">
				
				
				<div class="et_pb_code_inner">
					


<button type="button" data-filter="all" class="mixitup-control-active">All</button>
<button type="button" data-filter=".modern-contemporary">mc</button>
<button type="button" data-filter=".category-b">Category B</button>
<button type="button" data-filter=".category-c">Category C</button>
<section id="dp_portfolio">

	
	
	<ul class="wpv-loop js-wpv-loop">
		
			<li><div class="m3l_item m3l_filter mix ">
       <figure style="position:relative"><a href="<em><u>hidden link</u></em>" class="no-lightbox">
			<img src="https://ref.toolset.com/bootstrap-estate-layouts/files/2015/11/bigstock-Cheerful-businesswoman-pointin-86634719.jpg" class="attachment-et-pb-portfolio-module-image">
            <figcaption><h2>Tina J. Schlueter</h2></figcaption></a>
       </figure>
</div></li>
		
			<li><div class="m3l_item m3l_filter mix ">
       <figure style="position:relative"><a href="<em><u>hidden link</u></em>" class="no-lightbox">
			<img src="https://ref.toolset.com/bootstrap-estate-layouts/files/2015/11/bigstock-Happy-young-businessman-in-hea-90351002.jpg" class="attachment-et-pb-portfolio-module-image">
            <figcaption><h2>Virgil J. Walker</h2></figcaption></a>
       </figure>
</div></li>
		
			<li><div class="m3l_item m3l_filter mix ">
       <figure style="position:relative"><a href="<em><u>hidden link</u></em>" class="no-lightbox">
			<img src="https://ref.toolset.com/bootstrap-estate-layouts/files/2015/11/bigstock-Conversation-With-Pleasure-85863659.jpg" class="attachment-et-pb-portfolio-module-image">
            <figcaption><h2>Carolyn P. Parrott</h2></figcaption></a>
       </figure>
</div></li>
		
			<li><div class="m3l_item m3l_filter mix ">
       <figure style="position:relative"><a href="<em><u>hidden link</u></em>" class="no-lightbox">
			<img src="https://ref.toolset.com/bootstrap-estate-layouts/files/2015/11/bigstock-Portrait-of-a-young-smiling-bu-88982492.jpg" class="attachment-et-pb-portfolio-module-image">
            <figcaption><h2>Daniel M. Craig</h2></figcaption></a>
       </figure>
</div></li>
		
	</ul> </section>

				</div> <!-- .et_pb_code_inner -->
			</div> <!-- .et_pb_code -->
			</div>
#1300491
final.png

hi noted Minesh and that's truly frustrating and puzzling on my end.

To show this incompatibilty, I Redo brand new install with only 2019 theme, types, views and divi builder

1) created a view that shows [featured image] of all [pages]
2) add this views shortcode in divi builder code module in this post -> hidden link
3) Pls see screenshot for the 3 added divs
4) login access similar to previous if u wish to investigate further

#1301311

Minesh
Supporter

Languages: Anglais (English )

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

Yes - Now I can confirm and see the issue.

It happens when your posts are set to Edit using "Divi Builder" plugin and you used content template inside the view's loop output at this point it adds the extra divs.

If you check the 3rd post that is"Privacy Policy" post which is not set to edit using "Divi Builder" and you will see that no extra divs added to it:
=> hidden link

The workaround here is you should not use the "Content Template" within the view's loop:

<wpv-loop>
			<li>[wpv-post-body view_template="loop-item-in-view-allo"]</li>
</wpv-loop>

You should remove the content template and instead add all your content template code directly to view's loop.

#1301417

Hello, this is Beda, I am taking care of this issue and will have a few follow-up questions eventually, but I will first read carefully through your thread, duplicates and test sites provided, so to provide you with either a solution or explanation as of why what happens.

There may be a simple solution - however, I first need to replicate this issue according to your descriptions as there was some confusion leading to the issue being irreplicable yet on my local.

I'll feedback here as soon I have valid news for you (or more questions)

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