Issue Bug Closed

#90271TCEFORM Pages - Missing flag when we don't allow default language

Yohann CERDAN 01/31/20, 14:29 updated 02/04/20, 06:12

Description

Hi,

When we edit pages, we have a problem to display the default language flag.

For examples, we have 3 langs :
- 0 / EN
- 1 / FR
- 2 / DE

We have an editor, who can only edit contents in FR & DE.
When he edit the page properties in FR, we see the missing icon instead of the flag of the default language.
If we allow him the EN language (uid=0), everything is alright.

Made some few tests to find a problem in the class : typo3\sysext\backend\Classes\Form\FieldWizard\OtherLanguageContent.php - function render()
We have this line : $html[] = $iconFactory->getIcon($this->data['systemLanguageRows'][0]['flagIconIdentifier'], Icon::SIZE_SMALL)->render();

But, in our case, this is the $this->data[‘systemLanguageRows’] array :
@
-1 => array(4 items)
uid => -1 (integer)
title => ‘Toutes les langues’ (18 chars)
iso => ‘DEF’ (3 chars)
flagIconIdentifier => ‘flags-multiple’ (14 chars)
1 => array(4 items)
uid => 1 (integer)
title => ‘Français’ (9 chars)
iso => ‘fr’ (2 chars)
flagIconIdentifier => ‘flags-fr’ (8 chars)
2 => array(4 items)
uid => 2 (integer)
title => ‘Deutsch’ (7 chars)
iso => ‘de’ (2 chars)
flagIconIdentifier => ‘flags-de’ (8 chars)
@

So $this->data[‘systemLanguageRows’]0 will return an error.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.