Bug #80311

IRRE shows default + translated records

Added by Georg Ringer about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Localization
Target version:
-
Start date:
2017-03-16
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Stabilization Sprint

Description

It seems there is an issue with translations and IRRE ending up that in the backend, opening a record in default language will show translated AND default children, but only in 2nd level.

How to reproduce

  1. TYPO3 master
  2. clone https://github.com/einpraegsam/powermail branch develop
  3. Install the extension
  4. Switch to Install Tool and make a DB compare to create the additional l10n_source fields
  5. Create a new form with 1 form page with 1 field
  6. Create a translation of the sysfolder
  7. Translate the form
  8. Open the form record in default language > you will see 1 page form > you will see TWO fields

powermail does there nothing special regarding TCA, inline, so I expect that the core does something wrong there?

Bildschirmfoto 2017-03-16 um 23.22.02.png View (57.1 KB) Georg Ringer, 2017-03-16 23:25

typo3_2017-03-18.sql View (14.6 KB) Georg Ringer, 2017-03-18 07:40


Related issues

Related to TYPO3 Core - Bug #80944: Inline records are duplicated upon saving the master record Needs Feedback 2017-03-06

History

#1 Updated by Georg Ringer about 2 years ago

I don't know if those notes help:

\TYPO3\CMS\Backend\Form\FormDataProvider\TcaInlineConfiguration sets localizationMode to none

#2 Updated by Helmut Hummel about 2 years ago

  • Is Regression changed from No to Yes

The same thing correctly works in 7.6

#3 Updated by Thorsten Kahler about 2 years ago

Georg Ringer wrote:

I don't know if those notes help:

\TYPO3\CMS\Backend\Form\FormDataProvider\TcaInlineConfiguration sets localizationMode to none

This depends on the FormDataGroup and its providers: the $result['defaultLanguageRow'] has to be set by FormDataProvider DatabaseLanguageRows before TcaInlineConfiguration is executed. This dependency isn't defined in the dependency configuration in $TYPO3_CONF_VARS['SYS']['formEngine']['formDataGroup'][...]) and only met by accident. Any change to the formDataGroup configuration or dependency resolver algorithm might break this dependency. Any combination of TCA options that's not already done by the core in the exact same way might not be covered by the stock formDataGroup configuration.

In this case I assume following constellation:
The FormDataGroup inlineParentRecord contains the FormDataProvider TcaInlineConfiguration but not the FormDataProvider DatabaseLanguageRows so IRRE parent records don't load the $result['defaultLanguageRow']. Hence all inline child fields get the localizationMode set to "none".

#4 Updated by Oliver Hader about 2 years ago

  • Status changed from New to Needs Feedback
Could not reproduce with
  • powermail develop @3222a9a92db172b6e3001f0dce92bf3363b043b1
  • typo3 master @33102bd197960c8732fa0004d26b01eab0b10636

#5 Updated by Oliver Hader about 2 years ago

How does the database scenario look like? What are the field values of both tx_powermail_domain_model_field records for uid, sys_language_uid, l10n_parent, l10n_state and pages?

#6 Updated by Georg Ringer about 2 years ago

attached is a dump of my DB tables of tx_powermail

#7 Updated by Oliver Hader about 2 years ago

Thanks for the dump - there all values of tx_powermail_domain_model_field.pages point to the same parent record, thus it looks like a DataHandler issue.

#8 Updated by Oliver Hader about 2 years ago

Okay, I could reproduce the issue now with one additional step:

  • ...
  • Translate the form
  • Save the translated form entity in FormEngine (just creating the translated record is not enough)
  • Open the form record in default language > you will see 1 page form > you will see TWO fields

The issue is, that tx_powermail_domain_model_field.pages - which is defined as foreign_field of tx_powermail_domain_model_page.fields - uses l10n_mode=exclude. This causes the value of the default language record (of the field entity) being duplicated to the translated record - overriding the correct IRRE parent-pointer value.

#10 Updated by Oliver Hader about 2 years ago

  • Is Regression changed from Yes to No

#11 Updated by Oliver Hader about 2 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee set to Oliver Hader

Closing this issue, since it's not core related. The only thing the core could do, is to analyze all fields and filter out those that are defined as parent-pointer.

#12 Updated by Oliver Hader almost 2 years ago

  • Related to Bug #80944: Inline records are duplicated upon saving the master record added

Also available in: Atom PDF