Issue Bug Closed

#101635InstallTool not accessible on TYPO3 v12.4 update

Ingo Hollmann 08/09/23, 12:36 updated 12/02/25, 14:37

Description

Trying to update an existing TYPO3 Version I stumbled accross a Problem with FormProtection. We have a dev-envirment configured to use the NullBackend for all cachetypes via:

$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$cacheName]['backend'] = \TYPO3\CMS\Core\Cache\Backend\NullBackend::class;

After Update neither the InstallTool nor the Backend is working anymore.

TYPO3\CMS\Core\FormProtection\FormProtectionFactory::createForType(): Return value must be of type TYPO3\CMS\Core\FormProtection\AbstractFormProtection, bool returned

This is comming from here:

https://github.com/TYPO3/typo3/blob/3c9ad409dd55fe8ff6a003f927b7399e992d1ee4/typo3/sysext/core/Classes/FormProtection/FormProtectionFactory.php#L84

Disabling the use of NullBackend helps.
A possible solution is this;

# diff FormProtectionFactory.php FixedFormProtectionFactory.php 
68,69c68,70
<         $this->runtimeCache->set($identifier, $this->createInstance(...$classNameAndConstructorArguments));
<         return $this->runtimeCache->get($identifier);
---
>         $instance = $this->createInstance(...$classNameAndConstructorArguments)
>         $this->runtimeCache->set($identifier, $instance);
>         return $instance;
83,84c84,86
<         $this->runtimeCache->set($identifier, $this->createInstance(...$classNameAndConstructorArguments));
<         return $this->runtimeCache->get($identifier);
---
>         $instance = $this->createInstance(...$classNameAndConstructorArguments);
>         $this->runtimeCache->set($identifier, $instance);
>         return $instance;

Reviews 4

History 59

  1. Benni Mack commented and changed status New Rejected <span data-processor="relativetime" data-value="2024-12-10T12:45:30+00:00" > 12/10/24, 12:45 </span>

    Hey Ingo,

    sorry, but in your special dev-environment configuration, you have to configure “runtime” to use the TransientMemoryBackend class, instead of null, otherwise you will run in a lot of side-effects. I suggest to just skip the “runtime” cache to be set to null. This should also make your dev environments much faster.

    The problem arose because TYPO3 v12 uses runtime cache in more places than before.

    If you still have any issues here, let me know via email or slack, so we can coordinate any further changes, however this will be a “no-fix” as this is a configuration mis-use.
    All the best,
    Benni.

  2. Benni Mack commented and changed status Rejected Accepted <span data-processor="relativetime" data-value="2024-12-10T12:53:41+00:00" > 12/10/24, 12:53 </span>

    Hey Ingo,

    sorry, I investigated this issue further and found that you are right!

  3. Gerrit Code Review pushed patch set 1 for main to change 87417 status Accepted Under Review <span data-processor="relativetime" data-value="2024-12-10T12:54:06+00:00" > 12/10/24, 12:54 </span>

  4. Benjamin Franzke commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2024-12-11T15:05:13+00:00" > 12/11/24, 15:05 </span>

    Applied in changeset commit:8dd6e77efe91cf7c8b972abc1c694c06c2983cb2.