Project

General

Profile

Actions

Bug #103601

open

Setting l18n_parent to empty results in exception if Debug Preset is used and extension with allowLanguageSynchronization

Added by Sybille Peters 7 months ago. Updated 7 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2024-04-11
Due date:
% Done:

0%

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

Description

Versions

  • TYPO3 versions: v11 (latest 11.5 branch and latest release), not reproducible with v13 (latest main) and v12 (latest 12.4 ranch)
  • PHP 8.2
  • test with "Settings" Debug preset

did not test with v12 and v13

Reproduce

Ideally use an extension which adds a field to tt_content which has allowLanguageSynchronization true, e.g.

use extension https://github.com/sypets/sypets_tca_test

'tx_sypets_tca_test_check' => [
        'exclude' => 1,
        'label' => 'Checkbox with allowLanguageSynchronization',
        'config' => [
            'type' => 'check',
            'default' => 0,
            'behaviour' => [
                'allowLanguageSynchronization' => true
            ]
        ]
    ],

(1)

extension is activated, Debug mode

1. create translation page, translate with connected mode
2. edit translated element, set translate origin to empty and save

Exception is thrown, change is not successful

(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: Array to string conversion in /var/www/t3coredev11/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 8141

in /var/www/t3coredev11/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 8141

in function compareFieldArrayWithCurrentAndUnset

8137    {
8138        // No NULL values are allowed, this is the regular behaviour.
8139        // Thus, check whether strings are the same or whether integer values are empty ("0" or "").
8140        if (!$allowNull) {
8141            $result = (string)$submittedValue === (string)$storedValue || $storedType === 'int' && (int)$storedValue === (int)$submittedValue;
        // Null values are allowed, but currently there's a real (not NULL) value.
        // Thus, ensure no NULL value was submitted and fallback to the regular behaviour.
        } elseif ($storedValue !== null) {
            $result = (


(2)

extension is activated, Live mode

1. create translation page, translate with connected mode
2. edit translated element, set translate origin to empty and save

Change is successful

check log:

Thu, 11 Apr 2024 09:44:59 +0000 [WARNING] request="c78d853f870f9" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Array to string conversion in /var/www/t3coredev11/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 8141 
Thu, 11 Apr 2024 09:44:59 +0000 [WARNING] request="c78d853f870f9" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Array to string conversion in /var/www/t3coredev11/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php line 164 
Thu, 11 Apr 2024 09:44:59 +0000 [WARNING] request="c78d853f870f9" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (BE): PHP Warning: Array to string conversion in /var/www/t3coredev11/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 7530 


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #99226: Introduce dbType json for TCA type userClosed2022-11-30

Actions
Actions

Also available in: Atom PDF