Issue Bug Closed

#100572Module configuration - own navigation component not loaded

Andreas Pfeiffer 04/12/23, 23:18 updated 07/09/24, 12:55

Description

Hello,

when i register a backend sub module with an own navigation component, this component is not visible. Always the component from the main module is loaded. Even i set “inheritNavigationComponentFromMainModule” to true, no navigation at all is loaded.

I guess the problem is located in “vendor/typo3/cms-backend/Classes/Module/BaseModule.php” line 246.

if (isset($configuration['inheritNavigationComponentFromMainModule'])) {
    $obj->inheritNavigationComponent = (bool)$configuration['inheritNavigationComponentFromMainModule'];
} elseif (isset($configuration['navigationComponent'])) {
    $obj->navigationComponent = (string)$configuration['navigationComponent'];
} elseif (isset($configuration['navigationComponentId'])) {
    $obj->navigationComponent = (string)$configuration['navigationComponentId'];
}

If i set “inheritNavigationComponentFromMainModule”, the first “if” is done – but the others not anymore. Like this i disable the parent navigation component, but mine is never used. Shouldn´t it be like:

if (isset($configuration['inheritNavigationComponentFromMainModule'])) {
    $obj->inheritNavigationComponent = (bool)$configuration['inheritNavigationComponentFromMainModule'];
}

if (isset($configuration['navigationComponent'])) {
    $obj->navigationComponent = (string)$configuration['navigationComponent'];
}

if (isset($configuration['navigationComponentId'])) {
    $obj->navigationComponent = (string)$configuration['navigationComponentId'];
}

Thank you.

Reviews 1