Issue Bug Closed

#90974Form documentation advises to check for TYPO3_MODE === 'BE' in ext_localconf.php

Sybille Peters 04/07/20, 16:41 updated 09/29/20, 15:07

Description

I believe, this is highly discouraged due to caching reasons, see

> It is recommended to AVOID checks for values on TYPO3_MODE or TYPO3_REQUESTTYPE constants (e.g. if (TYPO3_MODE === ‘BE’)) within these files as it limits the functionality to cache the whole systems’ configuration. Any extension author should remove the checks if not explicitly necessary, and re-evaluate if these context-depending checks could go inside the hooks / caller function directly.

https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ExtensionArchitecture/ConfigurationFiles/Index.html

if (TYPO3_MODE === 'BE') {
see

If it is necessary to do that in that case, maybe add an explanation. In any case I find this confusing to have contradicting information.

Also, in the core “form” extension (at least for master), this check is not performed.

Reviews 3