Missing Navbar in Login Page

Hi guys,

I followed the steps to upgrade bootstrap 3.0 to 4.0 and had change all bootstrap setting to bootstrap4, but than a problem come up, my navbar is not showing up in the login page, but it is show up after user login, please help

<?php $this->beginBody() ?>
<?php

NavBar::begin([

    'brandLabel' => Yii::$app->name,

    'brandUrl' => Yii::$app->homeUrl,

          

]);

$menuItems = [

    ['label' => 'Home', 'url' => ['/site/index']],

];

if (Yii::$app->user->isGuest) {

    $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];

} else {

    $menuItems[] = [

        'label' => 'Logout('.Yii::$app->user->identity->username.')',

        'url' => ['/site/logout'],

        'linkOptions' => [

            'data-method' => 'post'

        ]

        ];

}

echo Nav::widget([

    'options' => ['class' => 'navbar-nav navbar-right'],

    'items' => $menuItems,

]);

NavBar::end();

?>

<div class="container">

    <?= Breadcrumbs::widget([

        'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],

    ]) ?>

    <?= Alert::widget() ?>

    <?= $content ?>

</div>

Hi, sorry for late reply, but is your bar in the HTML? Maybe the CSS is hiding it.

I am experiencing this same issue, please, can someone help? :pensive: