Bug #76943

In new BE extbase extension records sys_language_uid is set to -1 by default but should be 0

Added by Michael Hitzler about 3 years ago. Updated 5 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Localization
Start date:
2016-07-05
Due date:
% Done:

0%

TYPO3 Version:
7
PHP Version:
Tags:
Localization
Complexity:
Is Regression:
No
Sprint Focus:

Description

If I create a new extbase record in a 7.6.9 backend the default sys_language_uid is set to -1 which is all languages. I think it should be 0 (default) as a default. This can be archived by additionally set under config 'default' => 0. But default should be our default value here I'd say. In 6.2 versions the expected behavior "0" for sys_language_uid works out of the box without additional need to config 'default' => 0.

History

#1 Updated by Georg Ringer about 3 years ago

Some additional info

having some tca like that

'sys_language_uid' => array(
            'exclude' => 1,
            'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
            'config' => array(
                'type' => 'select',
                'foreign_table' => 'sys_language',
                'foreign_table_where' => 'ORDER BY sys_language.title',
                'items' => array(
                    array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
                    array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
                ),
            ),
        ),

  • in 6.2 the default value was still "0".
  • in 7, the default value - if no "default" is set, it will be the first value which is now -1

#2 Updated by Christian Kuhn about 3 years ago

still don't understand ... sorry, my head is in doctrine at the moment.

you're saying that if i have the tca as above, then 6.2 chooses 0 as displayed value if opening the record (new record) in formEngine. on save, 0 is persisted. and this very TCA with 7.6 formEngine chooses the first element with value -1 and thus -1 is now stored?

did i understand that correctly?

if so, i'd ask how that happened since afaik we didn't change default selection if no default is set in formEngine. additionally, i don't understand what extbase has to do with all that.

#3 Updated by Benni Mack 5 months ago

  • Target version changed from next-patchlevel to Candidate for patchlevel

Also available in: Atom PDF