Die Variable $arrOptionsexistiert in dieser Methode gar nicht, wird aber von Model::isPreviewMode() gefordert:
protected static function isPreviewMode(array $arrOptions)
Stack:
Symfony\Component\Debug\Exception\FatalThrowableError:
Type error: Argument 1 passed to Contao\Model::isPreviewMode() must be of the type array, null given, called in /daten/contao4go/contao4cm.contaodev/vendor/contao/comments-bundle/src/Resources/contao/models/CommentsModel.php on line 149
at vendor/contao/core-bundle/src/Resources/contao/library/Contao/Model.php:1310
at Contao\Model::isPreviewMode(null)
(vendor/contao/comments-bundle/src/Resources/contao/models/CommentsModel.php:149)
at Contao\CommentsModel::countPublishedBySourceAndParent('tl_content', '310')
(vendor/contao/comments-bundle/src/Resources/contao/classes/Comments.php:50)
at Contao\Comments->addCommentsToTemplate(object(FrontendTemplate), object(stdClass), 'tl_content', '310', 'no-reply@no.de')
(vendor/contao/comments-bundle/src/Resources/contao/elements/ContentComments.php:71)
at Contao\ContentComments->compile()
(vendor/contao/core-bundle/src/Resources/contao/elements/ContentElement.php:252)
at Contao\ContentElement->generate()
(vendor/contao/comments-bundle/src/Resources/contao/elements/ContentComments.php:51)
at Contao\ContentComments->generate()
(vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:485)
at Contao\Controller::getContentElement(object(ContentModel), 'main')
(vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:186)
at Contao\ModuleArticle->compile()
(vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:227)
at Contao\Module->generate()
(vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:67)
at Contao\ModuleArticle->generate(false)
(vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:424)
at Contao\Controller::getArticle(object(ArticleModel), false, false, 'main')
(vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:282)
at Contao\Controller::getFrontendModule('0', 'main')
(vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:177)
at Contao\PageRegular->prepare(object(PageModel))
(vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:49)
at Contao\PageRegular->getResponse(object(PageModel), true)
(vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:302)
at Contao\FrontendIndex->renderPage(object(Collection))
(vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:77)
at Contao\FrontendIndex->run()
(vendor/contao/core-bundle/src/Controller/FrontendController.php:42)
at Contao\CoreBundle\Controller\FrontendController->indexAction()
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:202)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(web/app_dev.php:62)
Installiert man in Contao 4.4.9 die Demo 4.0.0 und ruf dann über Navigation "Modules" - "Applications" auf, kommt bei mir obige Fehlermeldung.
Grund ist hier: https://github.com/contao/comments-bundle/blob/master/src/Resources/contao/models/CommentsModel.php#L149
Die Variable
$arrOptions
existiert in dieser Methode gar nicht, wird aber vonModel::isPreviewMode()
gefordert:protected static function isPreviewMode(array $arrOptions)
Stack: