Main Content div attributes are not set properly, breaking layout on any page with sidebar.

Created on 23 March 2018, over 7 years ago
Updated 9 July 2025, 3 days ago

In line 115 of bootstrap_barrio.theme, these lines appear:

//$width = _bootstrap_barrio_content_width(!empty($variables['page']['sidebar_first']), !empty($variables['page']['sidebar_second']));
//$content_width = 'col-md-' . $width;
$content_width = 'col';

The uncommented out line simply adds the class 'col' to the main content div. It never actually figures out if any sidebars exist, and what they are set to. That is actually done in the two commented out lines, tho at first glance it doesn't look like it accounts for every edge case. Adding just the class 'col' basically causes any layout with a sidebar to break.

It should be properly checking what sidebars exist, and what width they are set to (let alone what sizing it uses - sm, md, or lg).

πŸ’¬ Support request
Status

Closed: works as designed

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States spcbeck

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡¬Nigeria chike Nigeria

    Using Drupal 10.5.1 and Barrio 5.5.20 and having a slick image slider on the page, #8 fixed this issue.

    Thanks.

Production build 0.71.5 2024