Project

General

Profile

Actions

Bug #103970

open

Inline relations do not set the actual language

Added by Daniel Siepmann 8 months ago. Updated 20 days ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2024-06-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
localization, inline, irre
Complexity:
Is Regression:
Sprint Focus:

Description

Steps to reproduce:

  1. Create a site with at least two language
  2. Create a page within the site
  3. Create a content element in default language (don't save yet)
  4. Switch language of content element to all languages (-1) (don't save yet)
  5. 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.


Related issues 4 (4 open0 closed)

Related to TYPO3 Core - Bug #103969: Update language of inline elements is missing, leading to follow up issuesUnder Review2024-06-04

Actions
Related to TYPO3 Core - Bug #88980: Translating records with FAL relation where allowLanguageSynchronization set to trueUnder Review2019-08-20

Actions
Related to TYPO3 Core - Bug #81165: Creating IRRE record within a non-default language record sets wrong sys_language_uidUnder Review2017-05-08

Actions
Related to TYPO3 Core - Bug #101962: New records created on a field of type INLINE have the wrong sys_language_uid valueNew2024-03-14

Actions
Actions #1

Updated by Daniel Siepmann 8 months ago

  • Related to Bug #103969: Update language of inline elements is missing, leading to follow up issues added
Actions #2

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.

Actions #3

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.

Actions #4

Updated by Daniel Siepmann 8 months ago

  • Assignee deleted (Daniel Siepmann)
Actions #5

Updated by Daniel Siepmann 8 months ago

  • Tags set to localization, inline, irre
Actions #6

Updated by Sybille Peters 30 days ago

I can also reproduce this with the other way around:

  1. Create a content element of type textmedia
  2. In CE, set to language -1, save
  3. Add image (field "assets"), save
  4. Set CE set language to 0, save
  5. 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
  6. Now translate the element (connected mode)
  7. 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;

Actions #7

Updated by Sybille Peters 30 days ago

  • Related to Bug #88980: Translating records with FAL relation where allowLanguageSynchronization set to true added
Actions #8

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
Actions #9

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
Actions #10

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

Actions #11

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

Actions #12

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

Actions #13

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

Actions #14

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

Actions #15

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

Actions #16

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

Actions #17

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

Actions #18

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

Actions #19

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

Actions

Also available in: Atom PDF