-
Notifications
You must be signed in to change notification settings - Fork 77
Closed
Description
When upgrading to 3.1 and using the BootstrapNavbarHelper a MissingRouteException will be thrown from RouteCollection::parse, originating from BootstrapNavbarHelper::_normalize. The error message is "A route matching "/http://localhost/test" could not be found." (note the slash at front!)
This is likely due to the changes to RouteCollection::parse in CakePHP 3.4.
Test code:
$nav = $this->BootstrapNavbar;
echo $nav->beginMenu();
echo $nav->link('Test', ['controller' => 'Test', 'action' => 'index']);
echo $nav->end();I'm using CakePHP 3.4 and Bootstrap Helpers 3.1.
A simple fix is to disable automatic link activation:
$this->BootstrapNavbar->config('autoActiveLink', false);