Bug #73580
closedStory #69617: FormEngine bugs
renderType = selectTree looks odd and missing translation
0%
Description
Hi
Changing the TCA for pages.fe_group to renderType = selectTree the outputs looks odd and have missing translations.
I have attached pictures of the config (config.png) and screenshots of the the various backends (62.png) and (76.png)
Greatings
Claus
Files
Updated by Claus Harup over 8 years ago
Something has been corrected in 7.6.6, but we still miss the translations :-)
Updated by Claus Harup over 8 years ago
I might have found it:
sysext/backend/Classes/Form/FormDataProvider/TcaSelectTreeItems.php:
protected function prepareAdditionalItems(array $itemArray, array $selectedNodes) { $additionalItems = []; foreach ($itemArray as $item) { if ($item[1] === '--div--') { continue; } $additionalItems[] = [ 'uid' => $item[1], 'text' => $item[0], 'selectable' => true, 'leaf' => true, 'checked' => in_array($item[1], $selectedNodes), 'icon' => $item[3] ]; } return $additionalItems; }
protected function prepareAdditionalItems(array $itemArray, array $selectedNodes) { $additionalItems = []; foreach ($itemArray as $item) { if ($item[1] === '--div--') { continue; } $additionalItems[] = [ 'uid' => $item[1], 'text' => \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($item[0], ''), 'selectable' => true, 'leaf' => true, 'checked' => in_array($item[1], $selectedNodes), 'icon' => $item[3] ]; } return $additionalItems; }
Updated by Christian Kuhn over 8 years ago
- Parent task set to #69617
the not translated label should be fixed, actually, there is a method call "translateLabels()", but this is to early, or too late, or similar ... should have a look.
Updated by Georg Ringer over 8 years ago
- Status changed from New to Accepted
the translation is still not fixed in latest master (8)
Updated by Riccardo De Contardi almost 7 years ago
I've checked the presence of the reported code on both 8.7.9 and latest master; I've not found the function prepareAdditionalItems
and the file sysext/backend/Classes/Form/FormDataProvider/TcaSelectTreeItems.php
now reads (line 129 and followings):
[...] // And translate any labels from the static list $staticItems = $this->translateLabels($result, $staticItems, $table, $fieldName); // Now compile the target items using the same array structure as the "dynamic" list below foreach ($staticItems as $item) { if ($item[1] === '--div--') { // Skip divs that may occur here for whatever reason continue; } $finalItems[] = [ 'identifier' => $item[1], 'name' => $item[0], 'icon' => $item[2] ?? '', 'iconOverlay' => '', 'depth' => 0, 'hasChildren' => false, 'selectable' => true, 'checked' => in_array($item[1], $result['databaseRow'][$fieldName]), ]; } [...]
Maybe it has been solved in the meanwhile?
Updated by Christian Kuhn almost 7 years ago
- Status changed from Accepted to Needs Feedback
Hey, I think we'll not fix that in v7 anymore.
for v8 & master i think this has been fixed meanwhile, but I'm not entirely sure. would you like to re-test your scenario and see if current v8 or master are still affected?
Updated by Riccardo De Contardi over 6 years ago
- Assignee deleted (
Benni Mack) - Target version deleted (
next-patchlevel)
No feedback since the last 90 days => closing this issue.
If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or open a new issue with a reference to this one.
Thank you and best regards
Updated by Riccardo De Contardi over 6 years ago
- Status changed from Needs Feedback to Closed