From aa69e83ddc18ddb45d379970bc89585390cfc2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?El=C3=ADas=20Fern=C3=A1ndez?= Date: Mon, 25 Jan 2021 19:48:28 +0100 Subject: [PATCH] Avoid parent::construct error on News cached class When instantiating a News object from a third party extensions (such `EXT:news_importicsxml`) an error is thrown The error: Fatal error: Cannot call constructor from the cached class News: `/var/cache/code/news/tx_news_domain_model_news.php`. It seems that the problem is that there is no _construct method for the parent class \TYPO3\CMS\Extbase\DomainObject\AbstractEntity. Removing the `parent::_construct()` solves it. --- Classes/Domain/Model/News.php | 1 - 1 file changed, 1 deletion(-) diff --git a/Classes/Domain/Model/News.php b/Classes/Domain/Model/News.php index c6c06ec..3a80c40 100644 --- a/Classes/Domain/Model/News.php +++ b/Classes/Domain/Model/News.php @@ -37,7 +37,6 @@ class News extends \GeorgRinger\News\Domain\Model\News public function __construct() { - parent::__construct(); $this->ogImage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); $this->twitterImage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); }