You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Array to string conversion when copying fe_users record with tx_femanager_log inline relation #702
When copying a fe_users record in the TYPO3 backend, an exception is thrown if the user has related tx_femanager_domain_model_log records containing data in the additional_properties field.
Error
(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: Array to string conversion
in /vendor/doctrine/dbal/src/Driver/Mysqli/Statement.php line 73
Root Cause
When TYPO3's DataHandler::copyRecord_raw() copies the log record, it reads the existing DB row directly via SQL. TYPO3 automatically decodes type = json TCA fields into PHP arrays during this process. The decoded array value is then passed directly into insertNewCopyVersion() → insertDB() without re-encoding it to a JSON string. The Extbase setter setAdditionalProperties(string $additionalProperties) is never invoked in this path.
As a result, Doctrine DBAL receives a raw PHP array instead of a JSON string and throws Array to string conversion.
The field is defined as:
// TCA
'additional_properties' => [
'config' => [
'type' => 'json',
'readOnly' => true,
],
],
// Model setter
public function setAdditionalProperties(string $additionalProperties): void
{
$this->additionalProperties = $additionalProperties;
}
Steps to Reproduce
Have a fe_users record with at least one related tx_femanager_domain_model_log entry (e.g. after a successful frontend login)
Copy the fe_users record in the TYPO3 backend list module
Exception is thrown immediately
Expected Behavior
The fe_users record and its related log records are copied without error. The additional_properties JSON field is properly re-encoded to a string before the INSERT.
Suggested Fix
Before inserting the copied record, ensure additional_properties is JSON-encoded if it is an array:
Activity
eckonator commentedon Mar 25, 2026
my temp bugfix
web/vendor/vendor/your-femanager-addon-ext/Classes/Xclass/DataHandlerCopyFix.php
web/vendor/vendor/your-femanager-addon-ext/ext_localconf.php