Code Problem in my template.php
You just need to put all that logic into a single function:

function ukf2_preprocess_page(&amp;$vars) {
  if (isset($vars['node'])) {
    $vars['theme_hook_suggestion'] = 'page__'.$vars['node']-&gt;type; //
  }

  if (!empty($variables['page']['sidebar_first'])) {
    $variables['content_column_class'] = ' class="col-sm-10"';
  }

  else {
    $variables['content_column_class'] = ' class="col-sm-12"';
  }

  if (!empty($variables['page']['sidebar_second'])) {
    $variables['content_column_class2'] = ' class="col-sm-8"';
  }

  else {
    $variables['content_column_class2'] = ' class="col-sm-12"';
  }

}