Skip Navigation

[Resolved] Problem in layout with bootstrap and repetable fields

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

Problem: When using a 1 column Bootstrap Grid View, the markup generated by the Loop Wizard contains an unclosed div tag. This invalid markup causes my site design to break.

Solution: You can manually adjust the markup created by the loop wizard to produce a valid HTML structure. Example:

[wpv-layout-start]
    [wpv-items-found]
    <!-- wpv-loop-start -->
    <wpv-loop>
        <div class="col-sm-12">[wpv-post-body view_template="Loop item in Vista serveis"]</div>
    </wpv-loop>
    <!-- wpv-loop-end -->
    [/wpv-items-found]
    [wpv-no-items-found]
        <strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
    [/wpv-no-items-found]
[wpv-layout-end]

Or, you may apply the patch described in the following erratum. The permanent fix for this problem will be included in the next release of Views.
https://toolset.com/errata/view-loop-output-bootstrap-grid-missing-div-and-class/

100% of people find this useful.

This support ticket is created 6 years 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 5 years, 12 months ago.

Assisted by: Christian Cox.

Author
Posts
#1132588

Hi there.

I think that there is an incompatibility with bootstrap and repeteable fields

I'm using wpastra free without any page builder. I'm using Layouts

I have a view of repetable fields in one layout for single custom post type.

If I use bootstrap of 1 column to show that view... break the layout. I'm showing 2 fields (title and descripction, and only Shows Title
If I use unordered list, Shows Title and description and the and that layout is perfect.

I'm using also bootstrap with some columns to show other views (not for repetable fiels) and all works perfect.

I think that there is a problem with bootstrap tags.

Example: hidden link
View -> Serveis

The website is closed but I attach here user and pass to enter!

#1132855

Yes it looks like the Bootstrap Grid wizard isn't handling 1 column grids well, and it leaves a div tag unclosed. I modified the View's Loop code to use this format:

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
	<wpv-loop>
		<div class="col-sm-12">[wpv-post-body view_template="Loop item in Vista serveis"]</div>
	</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

This seems to fix the problem with unclosed div tags for now, but I need to report this issue to my 2nd tier support team for analysis. I'll let you know what I find out.

#1132955

My issue is resolved now. Thank you!

#1145825

For future reference purposes, an erratum post has been added about this issue: https://toolset.com/errata/view-loop-output-bootstrap-grid-missing-div-and-class/