mindshape-GmbH / mindshape_cookie_consent

This extension provides functionality to create a customizable cookie consent for your website. It is developed for flexibility to be customized in accordance to your data security guidelines.
10 stars 13 forks source link

Error: Typed property ...Configuration::$cookieCategories must not be accessed before initialization #54

Open devxpoint opened 1 week ago

devxpoint commented 1 week ago

TYPO3 11.5.13 with PHP 8.1 and composer mode -> installedmindshape_cookie_consent 3.2.2. -> add a configuration on root page (as usual)

I get in FE and BE errors, very similar:

Frontent:

`Typed property Mindshape\MindshapeCookieConsent\Domain\Model\Configuration::$necessaryCookieOptions must not be accessed before initialization in /html/typo3-2022/public/typo3conf/ext/mindshape_cookie_consent/Classes/Domain/Model/Configuration.php line 235

 * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Mindshape\MindshapeCookieConsent\Domain\Model\CookieOption>
 */
public function getNecessaryCookieOptions(): ObjectStorage
{
    return $this->necessaryCookieOptions;
}

/**
 * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Mindshape\MindshapeCookieConsent\Domain\Model\CookieOption> $necessaryCookieOptions

at Mindshape\MindshapeCookieConsent\Domain\Model\Configuration->getNecessaryCookieOptions() in /html/typo3-2022/public/typo3conf/ext/mindshape_cookie_consent/Classes/Domain/Model/Configuration.php line 386`

Backend on using the statistics module:

`Typed property Mindshape\MindshapeCookieConsent\Domain\Model\Configuration::$cookieCategories must not be accessed before initialization in /html/typo3-2022/public/typo3conf/ext/mindshape_cookie_consent/Classes/Domain/Model/Configuration.php line 347

 * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Mindshape\MindshapeCookieConsent\Domain\Model\CookieCategory>
 */
public function getCookieCategories(): ObjectStorage
{
    return $this->cookieCategories;
}

/**
 * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Mindshape\MindshapeCookieConsent\Domain\Model\CookieCategory> $cookieCategories

at Mindshape\MindshapeCookieConsent\Domain\Model\Configuration->getCookieCategories() in /html/typo3-2022/public/typo3conf/ext/mindshape_cookie_consent/Classes/Controller/Backend/StatisticController.php line 178`

What can be the reason?

I cleared cache and used dump autoload to ensure, everything is ok.

featdd commented 1 week ago

Hi @devxpoint,

I just had a look but could'nt reproduce this, but I use the more latest version of TYPO3 11.5.38. Can you try update your TYPO3? This is recommended anyway due to security updates.

Greetings Daniel

devxpoint commented 4 days ago

Hello Daniel,

is was the certain TYPO3 version... I updated to the latest version 11.5.38.

Thanks!

André

featdd commented 4 days ago

Hi @devxpoint,

thanks for the reply, I will increase the minimum version of the extension in the next update.

Greetings Daniel