Bug #76048
closedStory #69712: Further FormEngine development
IRRE: Child records - New record doesn't get language of parent (non localized records but using new button)
100%
Description
Since 7.6 if one adds a new record to an existing record which is not in the default language, the newly created child record will not receive the language of the parent record.
This is not a problem if the record is localized BUT:
1.) There might not be a language parent to the main record - record only exists in selected language
2.) It might be possible to add additional child records to those of the parent record
The issue seems to be:
https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php#l133
The commented out code here. Though I think with 7.6 we should move the code to a DataHandler.
I also don't think it helps if one creates a new record, changes it language and adds a child record prior to saving, see related issue.
Updated by Andreas Allacher over 8 years ago
Things that the old implementation didn't take care of:
1.) Setting the language to -1 for all wasn't transferred to childs, as the check was > 0, it should be != 0 or just set it always.
2.) Bug #63092
3.) Related to bug #63092: If one changes the language and creates a new child record prior to saving it will be created with the old langauge uid.
Updated by Jo Hasenau about 8 years ago
- Status changed from New to Accepted
- Assignee set to Jo Hasenau
-1 means "all", so this should not be transferred to children, since a parent element with that setting can contain children in any available language.
So the check should be > -1, since 0 should be transferred to children for example when switching back to the default language.
Updated by Andreas Allacher about 8 years ago
Maybe not transferred to existing children but I think newly created children should have -1 if the parent has -1, shouldn't it?
In regards to existing childs I have commented further in that regard in ticket #63092
Updated by Gerrit Code Review over 7 years ago
- Status changed from Accepted to Under Review
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52061
Updated by Gerrit Code Review over 7 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52061
Updated by Gerrit Code Review over 7 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52061
Updated by Gerrit Code Review over 7 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52061
Updated by Gerrit Code Review over 7 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52061
Updated by Gerrit Code Review over 7 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52061
Updated by Nicole Cordes over 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c4c2ae465ad11d7692d2c04e953f188f80b2bf35.
Updated by Gerrit Code Review over 7 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52148
Updated by Nicole Cordes over 7 years ago
- Status changed from Under Review to Resolved
Applied in changeset d9e9992259fe665932e6ba26954e52b4ceedeb7d.
Updated by Viktor Livakivskyi over 7 years ago
- Related to Feature #60026: Set explicitly 'readOnly' sys_language_uid of child to value, taken from parent record added
Updated by Gerrit Code Review over 7 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53205
Updated by Gerrit Code Review over 7 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53206
Updated by Gerrit Code Review over 7 years ago
Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53206
Updated by Gerrit Code Review over 7 years ago
Patch set 3 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53206
Updated by Gerrit Code Review over 7 years ago
Patch set 4 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53206
Updated by Gerrit Code Review over 7 years ago
Patch set 5 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53206
Updated by Anonymous over 7 years ago
- Status changed from Under Review to Resolved
Applied in changeset 9d3aa8618be9366f7b2457cdddc586cd6491dcea.
Updated by Tymoteusz Motylewski over 7 years ago
The backport to v7 has been merged (https://review.typo3.org/#/c/53206/)
Few notes:
1) Now NEW irre elements (including FAL relations) will get a sys_language_uid of their parent.
2) There is no automatic migration of the old record having inccorrect value in the sys_language_uid.
3) The issue has been solved on the FormEngine level, thus you need to make sure you have
sys_language_uid field in the showitem list in your TCA.
Often you don't want to show the sys_language field to the user, so there is a little trick, which will make stuff work without showing the field to the user.
You just need to create a hidden palette with sys_language_uid in it.
e.g.
'showitem' = '... --palette--;;hiddenLanguagePalette,'; 'hiddenLanguagePalette' => [ 'showitem' => 'sys_language_uid, l10n_parent', 'isHiddenPalette' => true, ],
See TCA for sys_file_reference where this approach is used, or this pull request as a reference https://github.com/benjaminkott/bootstrap_package/pull/458
Updated by Tymoteusz Motylewski about 7 years ago
- Related to Bug #76181: Languagefield-value of new inline relations is not in sync with the language of its parent element added
Updated by Mathias Brodala about 7 years ago
- Related to Bug #82330: cant create inline records if ctrl > enablecolumns > endtime is not specified in childrens TCA added
Updated by Daniel Siepmann 8 months ago
- Has duplicate Bug #101962: New records created on a field of type INLINE have the wrong sys_language_uid value added
Updated by Daniel Siepmann 8 months ago
- Has duplicate deleted (Bug #101962: New records created on a field of type INLINE have the wrong sys_language_uid value)
Updated by Daniel Siepmann 8 months ago
- Related to Bug #101962: New records created on a field of type INLINE have the wrong sys_language_uid value added