Contao 4.13 - MegaMenu mit Erweiterung derhaeuptling/contao-mega-menu Fehler
Moin,
ich habe ein Problem mit der Mega-Menu Erweiterung (https://github.com/DERHAEUPTLING/contao-mega-menu)
Ich habe eine individuelle Navigation erstellt, entsprechende Mega-Menus angelegt und den einzelnen Seiten zugewiesen. Funktioniert auch alles soweit.
Nur leider tritt dann ein Fehler auf bei meinen News-Detailseiten, die werfen ein 404 aus. Außerdem bei Detailseiten von verschiedenen Metamodels, welche ich im Einsatz habe.
Habe dann den Debug-Modus angeschmissen, da kommt dann schon auf der News-Verteilerseite folgender Fehler:
Code:
ErrorException:
Warning: Undefined array key "subitems"
at vendor/derhaeuptling/contao-mega-menu/templates/navigation/nav_mega_menu_default.html5:29
at include('/www/htdocs/w01a60f8/empit/contao413_2024/vendor/derhaeuptling/contao-mega-menu/templates/navigation/nav_mega_menu_default.html5')
(vendor/contao/core-bundle/src/Resources/contao/library/Contao/TemplateInheritance.php:108)
at Contao\Template->inherit()
(vendor/contao/core-bundle/src/Resources/contao/library/Contao/Template.php:295)
at Contao\Template->parse()
(vendor/contao/core-bundle/src/Resources/contao/classes/FrontendTemplate.php:43)
at Contao\FrontendTemplate->parse()
(vendor/contao/core-bundle/src/Resources/contao/modules/ModuleCustomnav.php:243)
at Contao\ModuleCustomnav->compile()
(vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:214)
at Contao\Module->generate()
(vendor/contao/core-bundle/src/Resources/contao/modules/ModuleCustomnav.php:56)
at Contao\ModuleCustomnav->generate()
(vendor/contao/core-bundle/src/Resources/contao/elements/ContentModule.php:98)
at Contao\ContentModule->generate()
(vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:622)
at Contao\Controller::getContentElement(object(ContentModel), 'main')
(vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:197)
at Contao\ModuleArticle->compile()
(vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:214)
at Contao\Module->generate()
(vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:70)
at Contao\ModuleArticle->generate(true)
(vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:550)
at Contao\Controller::getArticle('75', false, true)
(vendor/contao/core-bundle/src/Resources/contao/library/Contao/InsertTags.php:640)
at Contao\InsertTags->executeReplace
Das habe ich dann direkt im Template mit einem isset abgefangen, danach wird die News-Verteilerseite auch im Debug-Modus angezeigt.
Wenn ich dann aber auf die Detailseite wechsel, erscheint ein 404-Fehler, im Debug-Modus wird folgendes angezeigt:
Code:
Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "Page not found: https://sandbox.empit.info/preview.php/news/new/empit-s-groundbreaking-collaboration-in-corrosion-assessment" at /www/htdocs/w01a60f8/empit/contao413_2024/vendor/contao/core-bundle/src/EventListener/ExceptionConverterListener.php line 97
Wenn ich auf eine 'normale' Navigation wechsel, funktioniert alles wie gewünscht. Allerdings wird im Debug-Modus auch oben genannten Meldung ausgeworfen.
Hat jemand die Erweiterung auch im Einsatz, idealerweise dazu auch ein Nachrichten-System am Laufen?
Vielleicht hat ja jemand einen Tipp für mich.
Gruß
Karsten