Project

General

Profile

Actions

Bug #101635

open

InstallTool not accessible on TYPO3 v12.4 update

Added by Ingo Hollmann 9 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2023-08-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

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;

No data to display

Actions

Also available in: Atom PDF