Account created on 10 April 2018, over 6 years ago
#

Recent comments

FTR the fix that worked, tho different is:

/**
* Implements template_preprocess_region().
*/

function subthemename_preprocess_region(&$variables) {
	$variables['attributes']['id'] = "region--$region";
	if ($variables['region'] == 'navbar' && function_exists('render')) {
		$variables['content_left'] = [];
		$variables['content_center'] = [];
		$variables['content_right'] = [];
		foreach ($variables['elements'] as $id => $element) {
			if (is_array($element)) {
				$block = [];
        if (isset($element['#id'])) {
          $block = Block::load($element['#id']);
        }
        elseif (isset($element['#markup'])) {
          $block = Block::load($id);
        }
				if ($block) {
          $navbar_alignment = $block->getThirdPartySetting('uikit_components', 'uikit_navbar_alignment', 'left');
          switch ($navbar_alignment) {
            case 'left':
              $variables['content_left'][$id] = [
                '#markup' => render($element),
              ];
              break;
	            case 'center':
              $variables['content_center'][$id] = [
                '#markup' => render($element),
              ];
              break;
            case 'right':
              $variables['content_right'][$id] = [
                '#markup' => render($element),
              ];
              break;
          }
        }
      }
    }
  }
  else {
    uikit_preprocess_region($variables);
  }
}

Had this problem too - an occasionally vanishing navbar. A similar fix in preprocess.inc solved it.

Am closing as I now see that JQuery is required, and this change in the composer.json happened 6 months ago in preparation for D10 - https://git.drupalcode.org/project/uikit/-/commit/4c4e4c7c9d76b7750a9583...

It's a bit confusing as the dependency was removed 6 years ago, at least from the Readme: https://git.drupalcode.org/project/uikit/-/commit/14215a16730a0c798569f4...

Production build 0.71.5 2024