I'm guessing this isn't a bug, since you've demonstrated working copies, so I'm probably just missing some configuration step, but I've attached a screenshot to explain the problem I'm seeing. As far as I can tell, this was affecting not just my subtheme, but the Omega base theme as well, when I set it as the default theme. I think the only configuration change I made was to turn on the grid overlay option, leaving it disabled on page load.

I just updated my dev7 site and installed your theme since it looks like it's a really powerful base theme, so I'm pretty sure I have a clean install. Do you have any suggestions for figuring this one out?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

safetypin’s picture

Just started playing around with the content layout options, and putting both sidebars first, I get the appropriate layout, but it moving both sidebars to the left of the main content yields the attached results, both sidebars overlay the main content.

safetypin’s picture

Hrm. I guess I forgot to attach the first screenshot, so here it is.

safetypin’s picture

Hrm. I guess I forgot to attach the first screenshot, so here it is.

safetypin’s picture

FileSize
64.68 KB

Weird. Maybe there's something about that file name d.o doesn't like.

sangeight’s picture

Replacing line 207 with this bit did the trick for me.

$sl_pull = (!isset($vars['page']['sidebar_second']) || count($vars['page']['sidebar_second']) == 0 ) ? $content_width - $sidebar_first_width : $content_width - $sidebar_first_width - $sidebar_second_width;

Not sure $vars['page']['sidebar_second'] will always be an array.

EDIT: preprocess-page.inc is the file i'm talking about

sangeight’s picture

More changes required within template.php
Need to check for an empty array rather than null.

function _omega_dynamic_zones($width, $conditions, $vars) {
  foreach ($conditions AS $variable => $reaction) {
    if (($reaction['type'] && isset($vars['page'][$variable]) && count($vars['page'][$variable]) > 0 ) || (!$reaction['type'] && (!isset($vars['page'][$variable]) || count($vars['page'][$variable]) == 0)  )) {
      $width = $width - $reaction['value'];
    }
  }
  return $width;
} 
function dynamic_region_builder($region_data, $container_width, $vars) {
  // let's cycle the region data, and determine what we have
  
  foreach ($region_data AS $region => $info) {
    // if we do have content for this region, let's create it.
    if (isset($info['data']) && count($info['data'])>0 ) {
      if (isset($info['primary'])) {
        $width = $container_width;
....
himerus’s picture

Thanks guys for continuing to debug this.

I believed that the issue was fixed in the last dev release, and should have made the last tagged release.
I may not have the proper use cases setup in my test environment, but thought I had got all the appropriate issues for each layout type.

I will look at this further as soon as I get a chance over the next couple of days!!

himerus’s picture

Component: User interface » Code
Assigned: Unassigned » himerus
Category: support » bug
Priority: Normal » Critical

Could you guys both help me to test this bug in the current beta6 state by if you haven't already, installing the Omega Tools module, and exporting your theme settings so that I may use an exact copy that is demonstrating the bug?

You can either paste the settings here, or attach a text file with the data in it... This will help me replicate the bug, as I was completely sure I had finally squished this one in most use cases and positions for the sidebar layouts.

If I can just test this in the buggy format, I will quickly get this resolved and committed and released in a new tagged version.

tnanek’s picture

I have been experimenting with this as a base theme (actually Gamma) and quickly saw this issue. I am getting a screen similar to the first screenshot (though more colored since this is a Gamma subtheme).

Here's my export of current settings:

settings[reset_css] = '1'
settings[text_css] = '1'
settings[regions_css] = '1'
settings[defaults_css] = '1'
settings[custom_css] = '1'
settings[gamma_color_scheme] = 'blue'
settings[omega_render_search_box] = ''
settings[omega_search_default_text] = 'Search...'
settings[configurable_separator] = ' | '
settings[front_page_title_display] = 'custom'
settings[page_title_display_custom] = 'Travis' Territory'
settings[other_page_title_display] = 'ptitle_stitle'
settings[other_page_title_display_custom] = ''
settings[omega_breadcrumb] = 'yes'
settings[omega_breadcrumb_separator] = ' / '
settings[omega_breadcrumb_home] = '1'
settings[omega_breadcrumb_trailing] = '1'
settings[omega_breadcrumb_title] = '1'
settings[omega_general__active_tab] = 'edit-optional-css'
settings[omega_default_container_width] = '16'
settings[omega_fixed_fluid] = 'fluid'
settings[omega_branding_wrapper_width] = '16'
settings[omega_header_logo_width] = '10'
settings[omega_header_menu_width] = '6'
settings[omega_user_menu_width] = '6'
settings[omega_header_wrapper_width] = '16'
settings[omega_header_first_width] = '8'
settings[omega_header_second_width] = '8'
settings[omega_internal_nav_wrapper_width] = '16'
settings[omega_breadcrumb_slogan_width] = '10'
settings[omega_search_width] = '6'
settings[omega_preface_wrapper_grids] = '16'
settings[omega_preface_first_width] = '8'
settings[omega_preface_first_prefix] = ''
settings[omega_preface_first_suffix] = ''
settings[omega_preface_second_width] = '4'
settings[omega_preface_second_prefix] = ''
settings[omega_preface_second_suffix] = ''
settings[omega_preface_third_width] = '4'
settings[omega_preface_third_prefix] = ''
settings[omega_preface_third_suffix] = ''
settings[omega_content_layout] = 'first_content_last'
settings[omega_content_container_width] = '16'
settings[omega_sidebar_first_width] = '4'
settings[omega_content_main_width] = '8'
settings[omega_sidebar_second_width] = '4'
settings[omega_content_front_override] = ''
settings[omega_front_content_layout] = 'first_content_last'
settings[omega_front_content_container_width] = '16'
settings[omega_front_sidebar_first_width] = '4'
settings[omega_front_content_main_width] = '8'
settings[omega_front_sidebar_second_width] = '4'
settings[sidebar_combine] = '1'
settings[sidebar_contain_pages] = ''
settings[omega_postscript_container_width] = '16'
settings[omega_postscript_first_width] = '4'
settings[omega_postscript_first_prefix] = ''
settings[omega_postscript_first_suffix] = ''
settings[omega_postscript_second_width] = '4'
settings[omega_postscript_second_prefix] = ''
settings[omega_postscript_second_suffix] = ''
settings[omega_postscript_third_width] = '4'
settings[omega_postscript_third_prefix] = ''
settings[omega_postscript_third_suffix] = ''
settings[omega_postscript_fourth_width] = '4'
settings[omega_postscript_fourth_prefix] = ''
settings[omega_postscript_fourth_suffix] = ''
settings[omega_footer_header_tag] = 'Still Want More?'
settings[omega_footer_container_width] = '12'
settings[omega_footer_first_width] = '6'
settings[omega_footer_second_width] = '6'
settings[omega_regions__active_tab] = 'edit-main'
settings[debug_grid_toggle] = '1'
settings[debug_grid_toggle_state] = ''
settings[debug_grid_roles][3] = '3'
settings[debug_grid_roles][2] = '0'
settings[omega_admin__active_tab] = 'edit-grid-overlay'
safetypin’s picture

Here's my settings export:

settings[reset_css] = 1
settings[text_css] = 1
settings[regions_css] = 1
settings[defaults_css] = 1
settings[custom_css] = 1
settings[omega_render_search_box] = ''
settings[omega_search_default_text] = Search...
settings[configurable_separator] =  | 
settings[front_page_title_display] = title_slogan
settings[page_title_display_custom] = ''
settings[other_page_title_display] = ptitle_stitle
settings[other_page_title_display_custom] = ''
settings[omega_breadcrumb] = yes
settings[omega_breadcrumb_separator] =  / 
settings[omega_breadcrumb_home] = 1
settings[omega_breadcrumb_trailing] = 1
settings[omega_breadcrumb_title] = 1
settings[omega_general__active_tab] = edit-optional-css
settings[omega_default_container_width] = 16
settings[omega_fixed_fluid] = fixed
settings[omega_branding_wrapper_width] = 16
settings[omega_header_logo_width] = 6
settings[omega_header_menu_width] = 10
settings[omega_header_wrapper_width] = 16
settings[omega_header_first_width] = 8
settings[omega_header_second_width] = 8
settings[omega_internal_nav_wrapper_width] = 16
settings[omega_breadcrumb_slogan_width] = 10
settings[omega_search_width] = 6
settings[omega_preface_wrapper_grids] = 16
settings[omega_preface_first_width] = 4
settings[omega_preface_first_prefix] = 2
settings[omega_preface_first_suffix] = 2
settings[omega_preface_second_width] = 4
settings[omega_preface_second_prefix] = ''
settings[omega_preface_second_suffix] = ''
settings[omega_preface_third_width] = 4
settings[omega_preface_third_prefix] = ''
settings[omega_preface_third_suffix] = ''
settings[omega_content_layout] = first_last_content
settings[omega_content_container_width] = 16
settings[omega_sidebar_first_width] = 4
settings[omega_content_main_width] = 8
settings[omega_sidebar_second_width] = 4
settings[omega_content_front_override] = ''
settings[omega_front_content_layout] = first_last_content
settings[omega_front_content_container_width] = 16
settings[omega_front_sidebar_first_width] = 4
settings[omega_front_content_main_width] = 8
settings[omega_front_sidebar_second_width] = 4
settings[sidebar_combine] = 1
settings[sidebar_contain_pages] = ''
settings[omega_postscript_container_width] = 16
settings[omega_postscript_first_width] = 4
settings[omega_postscript_first_prefix] = ''
settings[omega_postscript_first_suffix] = ''
settings[omega_postscript_second_width] = 4
settings[omega_postscript_second_prefix] = ''
settings[omega_postscript_second_suffix] = ''
settings[omega_postscript_third_width] = 4
settings[omega_postscript_third_prefix] = ''
settings[omega_postscript_third_suffix] = ''
settings[omega_postscript_fourth_width] = 4
settings[omega_postscript_fourth_prefix] = ''
settings[omega_postscript_fourth_suffix] = ''
settings[omega_footer_container_width] = 12
settings[omega_footer_first_width] = 6
settings[omega_footer_second_width] = 6
settings[omega_regions__active_tab] = edit-main
settings[debug_grid_toggle] = 1
settings[debug_grid_toggle_state] = ''
settings[debug_grid_roles][3] = 3
settings[debug_grid_roles][2] = 0
settings[omega_admin__active_tab] = edit-grid-overlay
settings[general_settings__active_tab] = edit-theme-settings
himerus’s picture

Okay, I think I have this solved in the latest commits.

My sandbox is working in both the above configurations, and in any configuration I could test, along with each configuration WITH sidebars combined.
Please revert the files as appropriate. I took a different approach as the first_last_content layout option wasn't utilizing a feature built into the API.

  // FIRST - LAST - CONTENT
  case 'first_last_content':
  // pull data for the first sidebar
  $first_max_pull = $content_width - $sidebar_first_width;
  // pull data for the second sidebar
  $second_max_pull = $content_width - $sidebar_second_width;
  // push data for primary region
  $sc_max_push = $sidebar_first_width + $sidebar_second_width;

  
  // let's assign some new data to our $content_regions array to assing pull classes
  
  // sidebar_first will be pulled an exact amount assuming it exists in this layout
  $content_regions['sidebar_first']['pull'] = array(
    'width' => $first_max_pull,
    'conditions' => array(
      'sidebar_second' => array(
        'type' => TRUE,
        'value' => $sidebar_second_width,
      ),
    ),
  );
  $content_regions['sidebar_first']['push'] = FALSE;
  
  $content_regions['sidebar_second']['pull'] = array(
    'width' => $second_max_pull,
    'conditions' => array(
      'sidebar_second' => array(
        'type' => TRUE,
        'value' => $sidebar_first_width,
      ),
    ),
  );
  $content_regions['sidebar_second']['push'] = FALSE;
  
  // main_content will only be pushed in this layout
  $content_regions['main_content']['pull'] = FALSE;
  $content_regions['main_content']['push'] = array(
    'width' => $sc_max_push,
    'conditions' => array(
      'sidebar_first' => array(
        // type should either be TRUE or FALSE
        // false value here will use a ! operator in front of the variable in the ns() function
        'type' => FALSE,
        'value' => $sidebar_first_width,
      ),
      'sidebar_second' => array(
        // type should either be TRUE or FALSE
        // false value here will use a ! operator in front of the variable in the ns() function
        'type' => FALSE,
        'value' => $sidebar_second_width,
      ),
    ),
  );

  break;

The 'width' property is the maximum amount the sidebar could be pulled, which in this case would be the full content width minus the width of the current sidebar.

By using the $content_regions['sidebar_first']['pull'] method, the opposite sidebar (related item) is added to the 'conditions' array, and assigned a type of TRUE, which tells the function that if the related sidebar (second) DOES exist, to subtract the width of sidebar_second from the pull distance.

This has been committed, and will be tagged in the BETA7 release as soon as I look over a few other issues.

gafenn08’s picture

I Just tested this after downloading the new beta7 release and it is working for me! Thanks for the quick fix.

himerus’s picture

Status: Active » Fixed

Great... marking as fixed for now... I'm sure other weird scenarios might crop up where the sidebar sizing/positioning causes issue, but another issue would be probably appropriate in that case.

tnanek’s picture

This is working for me as well, thanks!

liberatr’s picture

Jake,

I found the initial experience with Gamma pretty confusing, as far as the "sidebars combined" experience was concerned.

I tried to move all of my "sidebar first" content to "sidebar second" and it was still rendered inside the "sidebar first" region of the page.tpl.php and on the left side of the page.

Once I started pecking here in the issue queue, I got the hint that there was a theme setting for this.

Documentation? I see that you do have this listed as a feature in your handbook page.

Omega didn't seem to have the same default behavior as Gamma. Maybe you could just put a comment in the gamma.info file "First and Second Sidebars are combined by default." That way it hits me in the face when I make it the default theme.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.