xperseguers / t3ext-cloudflare

The Cloudflare TYPO3 extension ensures your TYPO3 website is running optimally on the Cloudflare platform.
https://extensions.typo3.org/extension/cloudflare
GNU General Public License v3.0
7 stars 11 forks source link

Incompatible with v9.5 #4

Closed carstenwindler closed 4 years ago

carstenwindler commented 5 years ago

First of all, thanks for this really useful extension!

With Typo3 v9.5.5, when I want to clear the cache for a single page, I get

(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: Creating default object from empty value in /app/web/typo3conf/ext/cloudflare/Classes/Hooks/TCEmain.php line 199

$GLOBALS['TYPO3_DB']->debugOutput = false;

Because of this

https://docs.typo3.org/typo3cms/extensions/core/Changelog/9.0/Breaking-80929-TYPO3_DBMovedToExtension.html

Surely one could install the Typo3 legacy DB extension, but you won't get far

(1/1) Error
Call to protected/private method TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::getPageAndRootline()

because of this

https://docs.typo3.org/typo3cms/extensions/core/Changelog/9.3/Deprecation-84965-VariousTypoScriptFrontendControllerMethods.html

I forked your extension and will prepare a fix, however it will miss some of the checks you did in TCEmain.php. If you like I can share my findings. I could also prepare a PR, but as this class is not tested I don't feel really comfortable about it :-)