Bug #57063
closed
Parent language is not applied to new child records
Added by David Greiner about 10 years ago.
Updated over 5 years ago.
Category:
FormEngine aka TCEforms
Description
Hi!
When creating a element in another language than the default language and adding a child element via IRRE, i am expecting that the child element gets the same language as the parent element.
For instance a news element from tx_news:
- Create new news element and choose a language which is not defined as default
- save
- add a media element via irre
- now you have to select the language in the media element again
This behaviour is not very usable for editors.
Files
- Status changed from New to Accepted
- Complexity set to medium
I'll have a look - thx for the patch!
Besides that, I could reproduce the misbehavior.
- Subject changed from IRRE: Use localization of parent element to Parent language is not applied to child records
- Subject changed from Parent language is not applied to child records to Parent language is not applied to new child records
- Status changed from Accepted to Under Review
David, I modified your patch a little bit, however it was the correct place and correct bug analysis! Good catch & thanks!
Just wasted a half day with handling the complications without this function working. Thanks alot!
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Looks like this bug reappears in 7.6 LTS.
The fix from 3e6e8ec89c00b04485a3c6050e0cfdd9548a213e is commented out in TYPO3\CMS\Backend\Controller\FormInlineAjaxController on line 139:
// Set language of new child record to the language of the parent record:
// @todo: To my understanding, the below case can't happen: With localizationMode select, lang overlays
// @todo: of children are only created with the "synchronize" button that will trigger a different ajax action.
// @todo: The edge case of new page overlay together with localized media field, this code won't kick in either.
/**
if ($parent['localizationMode'] === 'select' && MathUtility::canBeInterpretedAsInteger($parent['uid'])) {
$parentRecord = $inlineRelatedRecordResolver->getRecord($parent['table'], $parent['uid']);
$parentLanguageField = $GLOBALS['TCA'][$parent['table']]['ctrl']['languageField'];
$childLanguageField = $GLOBALS['TCA'][$child['table']]['ctrl']['languageField'];
if ($parentRecord[$parentLanguageField] > 0) {
$record[$childLanguageField] = $parentRecord[$parentLanguageField];
}
}
*/
Markus, is it still an issue with current v7 or 8 branch? If yes, plase open a new ticket with steps to reproduce the issue? I tried to reproduce but I couldn't.
- Status changed from Resolved to Closed
Also available in: Atom
PDF