Contao 5: Fehlermeldung bei Seiten mit Modultyp Nachrichtenarchiv-Menü
Hi,
bei der Umstellung von Contao 4.13 auf 5.1.11 gibt es eine Fehlermeldung bei Seiten, die ein Modultyp Nachrichtenarchiv-Menü mit den Template-Einstellungen mod_newsmenu(Standard) enthalten.
Im Trace kommt diese Fehlermeldung:
Attempted to call an undefined method named "getNewsModelAdapter" of class "Codefog\NewsCategoriesBundle\Criteria\NewsCriteri a".
Code:
Symfony\Component\ErrorHandler\Error\UndefinedMethodError:
Attempted to call an undefined method named "getNewsModelAdapter" of class "Codefog\NewsCategoriesBundle\Criteria\NewsCriteria".
at vendor/codefog/contao-news_categories/src/FrontendModule/NewsMenuModule.php:257
at Codefog\NewsCategoriesBundle\FrontendModule\NewsMenuModule->getFilteredNewsIds()
(vendor/codefog/contao-news_categories/src/FrontendModule/NewsMenuModule.php:51)
at Codefog\NewsCategoriesBundle\FrontendModule\NewsMenuModule->compileYearlyMenu()
(vendor/contao/news-bundle/contao/modules/ModuleNewsMenu.php:92)
at Contao\ModuleNewsMenu->compile()
(vendor/codefog/contao-news_categories/src/FrontendModule/NewsMenuModule.php:41)
at Codefog\NewsCategoriesBundle\FrontendModule\NewsMenuModule->compile()
(vendor/contao/core-bundle/contao/modules/Module.php:213)
at Contao\Module->generate()
(vendor/contao/news-bundle/contao/modules/ModuleNewsMenu.php:81)
at Contao\ModuleNewsMenu->generate()
(vendor/contao/core-bundle/contao/library/Contao/Controller.php:411)
at Contao\Controller::getFrontendModule(object(ModuleModel), 'left')
(vendor/contao/core-bundle/contao/elements/ContentModule.php:59)
at Contao\ContentModule->generate()
(vendor/contao/core-bundle/contao/library/Contao/Controller.php:569)
at Contao\Controller::getContentElement(object(ContentModel), 'left')
(vendor/contao/core-bundle/contao/modules/ModuleArticle.php:196)
at Contao\ModuleArticle->compile()
(vendor/contao/core-bundle/contao/modules/Module.php:213)
at Contao\Module->generate()
(vendor/contao/core-bundle/contao/modules/ModuleArticle.php:69)
at Contao\ModuleArticle->generate(false)
(vendor/contao/core-bundle/contao/library/Contao/Controller.php:497)
at Contao\Controller::getArticle(object(ArticleModel), false, false, 'left')
(vendor/contao/core-bundle/contao/library/Contao/Controller.php:362)
at Contao\Controller::getFrontendModule('0', 'left')
(vendor/contao/core-bundle/contao/pages/PageRegular.php:171)
at Contao\PageRegular->prepare(object(PageModel))
(vendor/contao/core-bundle/contao/pages/PageRegular.php:46)
at Contao\PageRegular->getResponse(object(PageModel), true)
(vendor/contao/core-bundle/contao/controllers/FrontendIndex.php:76)
at Contao\FrontendIndex->renderPage(object(PageModel))
(vendor/symfony/http-kernel/HttpKernel.php:181)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:76)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:197)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(public/preview.php:46)
Wenn ich das Modul deaktiviere, dann funktioniert die Seite.
Gibt es da eine Veränderung von Contao 4 zu Contao 5?
Liste der Anhänge anzeigen (Anzahl: 1)
codefog/contao-news_categories macht mir da bissl Probleme
Anhang 26915
Es kommt bei mir folgende Fehlermeldung im Trace:
Codefog\NewsCategoriesBundle\Criteria\NewsCriteria ::setLimit(): Argument #1 ($limit) must be of type int, null given, called in /html/cto_5x/vendor/codefog/contao-news_categories/src/FrontendModule/NewsArchiveModule.php on line 165
Code:
TypeError:
Codefog\NewsCategoriesBundle\Criteria\NewsCriteria::setLimit(): Argument #1 ($limit) must be of type int, null given, called in /html/cto_5x/vendor/codefog/contao-news_categories/src/FrontendModule/NewsArchiveModule.php on line 165
at vendor/codefog/contao-news_categories/src/Criteria/NewsCriteria.php:278
at Codefog\NewsCategoriesBundle\Criteria\NewsCriteria->setLimit(null)
(vendor/codefog/contao-news_categories/src/FrontendModule/NewsArchiveModule.php:165)
at Codefog\NewsCategoriesBundle\FrontendModule\NewsArchiveModule->fetchNewsItems(0, 1706288853)
(vendor/codefog/contao-news_categories/src/FrontendModule/NewsArchiveModule.php:129)
at Codefog\NewsCategoriesBundle\FrontendModule\NewsArchiveModule->compile()
(vendor/contao/core-bundle/contao/modules/Module.php:213)
at Contao\Module->generate()
(vendor/contao/news-bundle/contao/modules/ModuleNewsArchive.php:80)
at Contao\ModuleNewsArchive->generate()
(vendor/contao/core-bundle/contao/library/Contao/Controller.php:411)
at Contao\Controller::getFrontendModule(object(ModuleModel), 'main')
(vendor/contao/core-bundle/contao/elements/ContentModule.php:59)
at Contao\ContentModule->generate()
(vendor/contao/core-bundle/contao/library/Contao/Controller.php:569)
at Contao\Controller::getContentElement(object(ContentModel), 'main')
(vendor/contao/core-bundle/contao/modules/ModuleArticle.php:196)
at Contao\ModuleArticle->compile()
(vendor/contao/core-bundle/contao/modules/Module.php:213)
at Contao\Module->generate()
(vendor/contao/core-bundle/contao/modules/ModuleArticle.php:69)
at Contao\ModuleArticle->generate(false)
(vendor/contao/core-bundle/contao/library/Contao/Controller.php:497)
at Contao\Controller::getArticle(object(ArticleModel), false, false, 'main')
(vendor/contao/core-bundle/contao/library/Contao/Controller.php:362)
at Contao\Controller::getFrontendModule('0', 'main')
(vendor/contao/core-bundle/contao/pages/PageRegular.php:171)
at Contao\PageRegular->prepare(object(PageModel))
(vendor/contao/core-bundle/contao/pages/PageRegular.php:46)
at Contao\PageRegular->getResponse(object(PageModel), true)
(vendor/contao/core-bundle/contao/controllers/FrontendIndex.php:66)
at Contao\FrontendIndex->renderPage(object(PageModel))
(vendor/symfony/http-kernel/HttpKernel.php:181)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:76)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:197)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(public/preview.php:46)