Bug #103970
openInline relations do not set the actual language
0%
Description
Steps to reproduce:
- Create a site with at least two language
- Create a page within the site
- Create a content element in default language (don't save yet)
- Switch language of content element to all languages (-1) (don't save yet)
- Attach a file relation and save.
Result:
The relation will be saved with 0 for languages, which can be confirmed by select sys_language_uid from sys_file_reference
once saved.
Expected:
The relation will be saved with -1 for language, as that's what was chosen in the parent while creating the relation.
Updated by Daniel Siepmann 8 months ago
- Related to Bug #103969: Update language of inline elements is missing, leading to follow up issues added
Updated by Daniel Siepmann 8 months ago ยท Edited
It seems the context provided in AJAX is already wrong JSON.parse(JSON.parse(this.createRequestBody(t)['ajax[context]'])['config'])
reveals the original instead of current language.
This is then returned from AJAX request and rendered within the form, leading to the value being submitted to DataHandler on save.
Updated by Daniel Siepmann 8 months ago
Our suggestion: Adjust the context to use the actual currently selected language.
Also on every update of the parent language, update all inline language values to match the parent.
Updated by Sybille Peters 30 days ago
I can also reproduce this with the other way around:
- Create a content element of type textmedia
- In CE, set to language -1, save
- Add image (field "assets"), save
- Set CE set language to 0, save
- Now look at the entry in the DB, the entry in sys_file_reference will be with -1, the entry in the content element will be with 0
- Now translate the element (connected mode)
- Open the translated element: you will see 2 file reference, one of them is dimmed (this is the sys_file_reference=-1 one from the CE in orginal language) and one of them is the copied element.
And I think this is the same root cause as #88980 with the additional problem that in #88980 allowLanguageSynchronization is set to true and then the images in the default language are copied on translate.
You can find existing records like this:
select r.uid,t.pid,r.pid,r.sys_language_uid,t.sys_language_uid,t.header from sys_file_reference r inner join tt_content t on r.uid_foreign=t.uid where not r.deleted and not r.hidden and r.sys_language_uid=-1 and r.tablenames='tt_content' and r.sys_language_uid!=t.sys_language_uid order by r.pid,r.uid;
or just search for mismatch in sys_language_uid:
select r.uid,t.pid,r.pid,r.sys_language_uid,t.sys_language_uid,t.header from sys_file_reference r inner join tt_content t on r.uid_foreign=t.uid where not r.deleted and not r.hidden and r.tablenames='tt_content' and r.sys_language_uid!=t.sys_language_uid order by r.pid,r.uid;
Updated by Sybille Peters 30 days ago
- Related to Bug #88980: Translating records with FAL relation where allowLanguageSynchronization set to true added
Updated by Sybille Peters 30 days ago
- Related to Bug #81165: Creating IRRE record within a non-default language record sets wrong sys_language_uid added
Updated by Sybille Peters 30 days ago
- Related to Bug #101962: New records created on a field of type INLINE have the wrong sys_language_uid value added
Updated by Gerrit Code Review 22 days ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87595
Updated by Gerrit Code Review 22 days ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87595
Updated by Gerrit Code Review 22 days ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87595
Updated by Gerrit Code Review 22 days ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87595
Updated by Gerrit Code Review 22 days ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87595
Updated by Gerrit Code Review 22 days ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87595
Updated by Gerrit Code Review 21 days ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87595
Updated by Gerrit Code Review 21 days ago
Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87595
Updated by Gerrit Code Review 20 days ago
Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87595
Updated by Gerrit Code Review 20 days ago
Patch set 10 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87595