Project

General

Profile

Actions

Bug #73580

closed

Story #69617: FormEngine bugs

renderType = selectTree looks odd and missing translation

Added by Claus Harup over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2016-02-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

config.PNG (23.2 KB) config.PNG Claus Harup, 2016-02-20 21:23
62.PNG (13.2 KB) 62.PNG Claus Harup, 2016-02-20 21:23
76.PNG (10.4 KB) 76.PNG Claus Harup, 2016-02-20 21:23
766.png (2.93 KB) 766.png Claus Harup, 2016-04-29 14:11
Actions #1

Updated by Claus Harup over 8 years ago

Something has been corrected in 7.6.6, but we still miss the translations :-)

Actions #2

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;
    }
Actions #3

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.

Actions #4

Updated by Georg Ringer over 8 years ago

  • Status changed from New to Accepted

the translation is still not fixed in latest master (8)

Actions #5

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?

Actions #6

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?

Actions #7

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

Actions #8

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Needs Feedback to Closed
Actions

Also available in: Atom PDF