Bug #91778

Localization wizard missing with rendermode selectTree (allowLanguageSynchronization)

Added by Robert Kärner over 1 year ago. Updated 8 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2020-07-10
Due date:
% Done:

100%

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

Description

Two years ago, this issue has already been tackled and solved at bug #84564

In March 2019 this feature has been broken by commit 6c512f2e,
where the values of $readOnly have been changed from 'true'/'false' to 0/1:

$readOnly = !empty($config['readOnly']) ? 1 : 0;

However, the condition to show the $fieldWizardHtml still checks for 'false',
which can never be true if $readOnly equals 0 or 1:

if ($readOnly === 'false' && !empty($fieldWizardHtml)) {
    $html[] =       '<div class="form-wizards-items-bottom">';
    $html[] =           $fieldWizardHtml;
    $html[] =       '</div>';
}

Please see typo3/sysext/backend/Classes/Form/Element/SelectTreeElement.php
lines 84 and 173.

Right now, the language synchronization of page categories can still be enabled with

$GLOBALS['TCA']['pages']['columns']['categories']['config']['behaviour']['allowLanguageSynchronization'] = true;

and it works fine, but editors can't turn off this behaviour for individual pages.


Related issues

Related to TYPO3 Core - Task #87987: Migrate SelectTreeElement to TypeScriptClosedAndreas Fernandez2019-03-23

Actions
Related to TYPO3 Core - Bug #93497: Localization state missing for TCA SelectTreeElementClosed2021-02-12

Actions
#1

Updated by Imko Schumacher 10 months ago

  • Subject changed from allowLanguageSynchronization translation behavior options missing again for TCA type select with rendermode selectTree to Localization wizard missing with rendermode selectTree (allowLanguageSynchronization)

The localization state selector wizard does not show up with selectTree.

Prerequisites

  • At least two languages with a site configuration
  • A translatable record (see Multi-language domain objects )
    • TCA configuration:
          'ctrl' => [
              'languageField' => 'sys_language_uid',
              'transOrigPointerField' => 'l10n_parent',
          ],
          'columns' => [
              'sys_language_uid' => [...],
              'l10n_parent' => [...]
          ],
          
  • A selectTreeElement with "allowLanguageSynchronization" enabled. Categories is a good usecase (inside TCA/Overrides): (see Making a Table Categorizable)
    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable(
        'EXTENSIONNAME',
        'EXTENSIONTABLE',
        'categories',
        [
            'fieldConfiguration' => [
                'behaviour' => [
                    'allowLanguageSynchronization' => true
                ],
            ],
        ]
    );
    
  • (Optional) Some categories to test

Steps to reproduce

  1. Create a record
  2. Translate the record
  3. Look a the categories (in the translated record) and and change them
  4. Save

Actual results

The localization state selector wizard with two radio buttons is missing.
A side effect is that the changes are not saved.

Expected results

The localization state selector wizard with two radio buttons.
Similar to
.
(https://docs.typo3.org/m/typo3/reference-tca/10.4/en-us/ColumnsConfig/Type/selectTree.html#fieldwizard-localizationstateselector)

#2

Updated by Gerrit Code Review 10 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68521

#3

Updated by Gerrit Code Review 10 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68521

#4

Updated by Gerrit Code Review 10 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68521

#5

Updated by Gerrit Code Review 10 months ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68536

#6

Updated by Imko Schumacher 10 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#7

Updated by Christian Kuhn 10 months ago

  • Related to Task #87987: Migrate SelectTreeElement to TypeScript added
#8

Updated by Torben Hansen 10 months ago

  • Related to Bug #93497: Localization state missing for TCA SelectTreeElement added
#9

Updated by Benni Mack 8 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF