Bug #91778
closedLocalization wizard missing with rendermode selectTree (allowLanguageSynchronization)
100%
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.
Updated by Imko Schumacher over 3 years 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' => [...] ],
- TCA configuration:
- 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¶
- Create a record
- Translate the record
- Look a the categories (in the translated record) and and change them
- 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)
Updated by Gerrit Code Review over 3 years 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
Updated by Gerrit Code Review over 3 years 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
Updated by Gerrit Code Review over 3 years 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
Updated by Gerrit Code Review over 3 years 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
Updated by Imko Schumacher over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e9a3803149344310c7868e5ba2be92ef3f5922bd.
Updated by Christian Kuhn over 3 years ago
- Related to Task #87987: Migrate SelectTreeElement to TypeScript added
Updated by Torben Hansen over 3 years ago
- Related to Bug #93497: Localization state missing for TCA SelectTreeElement added