octobercms/october · error · SystemException
Unable to add navigation items before they are loaded.
Error message
Unable to add navigation items before they are loaded.
What it means
Error "Unable to add navigation items before they are loaded." thrown in octobercms/october.
Source
Thrown at modules/backend/classes/NavigationManager.php:214
* @param array $definitions
*/
public function addMainMenuItems($owner, array $definitions)
{
foreach ($definitions as $code => $definition) {
$this->addMainMenuItem($owner, $code, $definition);
}
}
/**
* addMainMenuItem dynamically adds a single main menu item.
* @param string $owner
* @param string $code
* @param array $definition
*/
public function addMainMenuItem($owner, $code, array $definition)
{
if ($this->items === null) {
throw new SystemException('Unable to add navigation items before they are loaded.');
}
$itemKey = $this->makeItemKey($owner, $code);
if (isset($this->items[$itemKey])) {
$definition = array_merge(
$this->items[$itemKey]->toArray(),
$definition
);
}
$item = array_merge($definition, [
'code' => $code,
'owner' => $owner
]);
$sideMenu = array_pull($item, 'sideMenu');
View on GitHub (pinned to b608633a7e)
When it happens
Trigger: Thrown at modules/backend/classes/NavigationManager.php:214 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of octobercms/october@b608633a7e (2026-08-21).
Data as JSON: /api/errors/9f7d1f719aabb219.
Report an issue: GitHub.