Actions
Bug #83667
closedLanguage menu is displayed for new (unsaved) records
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2018-01-24
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
Language menu is displayed for new (unsaved) records, showing faulty select options
The bug is caused by the EditDocumentController not checking if any data is loaded for the current record, which is not the case if a new and unsaved record is edited.
The EditDocumentController continues to build the language menu, although the context in which it is build is faulty because of the missing data.
- create a tt_news record in a non-default language (field sys_language_uid>0) without any original record set (field l18n_parent=0)
- create a new tt_news record: the language menu is shown with the single entry of the language of the above record
- add condition to avoid building the language menu if no data is loaded for the current record
- typo3/sysext/backend/Classes/Controller/EditDocumentController.php languageSwitch():
if (is_array($langRows) && count($langRows) > 1) { $rowsByLang = []; $fetchFields = 'uid,' . $languageField . ',' . $transOrigPointerField; // Get record in current language $rowCurrent = BackendUtility::getLiveVersionOfRecord($table, $uid, $fetchFields); if (!is_array($rowCurrent)) { $rowCurrent = BackendUtility::getRecord($table, $uid, $fetchFields); } /** * BUGFIX START */ if (is_array($rowCurrent)) { /** * BUGFIX END */ $currentLanguage = (int)$rowCurrent[$languageField]; // Disabled for records with [all] language! if ($currentLanguage > -1) {
Affected TYPO3 versions: at least 7 & 8
Updated by Susanne Moog almost 7 years ago
- Category set to FormEngine aka TCEforms
Updated by Susanne Moog over 4 years ago
- Status changed from New to Closed
This is fixed meanwhile due to the introduction of the new site / language handling and the rewritten handling of the language drop downs.
Actions