Project

General

Profile

Actions

Bug #75400

closed

Related child elements don't get correct sys_language_uid during localization of parent record

Added by Jan-Michael Loew almost 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Localization
Start date:
2016-04-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
On Location Sprint

Description

When trying to copy Content Elements with inline relations (e.g. Image Elements, also happens with Gridelements), the inline relations are not translated.


Files


Related issues 3 (1 open2 closed)

Related to TYPO3 Core - Bug #63092: Inline/IRRE records: language field of child records is not updated when modifying parent language field - e.g. problematic for sys_file_referenceRejectedJo Hasenau2014-11-20

Actions
Related to TYPO3 Core - Bug #68040: Inline localize and/or synchronize does not respect sortingUnder Review2018-03-142018-03-14

Actions
Related to TYPO3 Core - Bug #78599: Copy localized content element leads to wrong reference, translation failsClosedMarkus Mächler2016-11-07

Actions
Actions #1

Updated by Mathias Brodala almost 8 years ago

Notice that this refers to the "Copy" mode for content translation. Thus basically the content element is copied with the target language set, but none of its "children" is.

Actions #2

Updated by Jo Hasenau almost 8 years ago

  • Subject changed from Inline Relations not translated on copy of Content Element to Related child elements don't get correct sys_language_uid during localization of parent record
  • Category set to Localization
  • Priority changed from Should have to Must have
  • Target version set to 7.6.3
Actions #3

Updated by Mathias Brodala almost 8 years ago

  • Target version changed from 7.6.3 to next-patchlevel
Actions #4

Updated by Jo Hasenau almost 8 years ago

  • Target version changed from next-patchlevel to 7.6.3

Basically the copy mode triggers a simple copy action for that parent element and just adds the sys_language_uid within the update array.
So while the copy action nicely cascades and copies all the related children and grandchildren, the language information will just be applied to the first level.

Actions #5

Updated by Mathias Brodala almost 8 years ago

Why target TYPO3 7.6.3? That version was already released (currently 7.6.5), thus next-patchlevel is the only option here.

Actions #6

Updated by Jo Hasenau almost 8 years ago

  • Status changed from New to Accepted

Just didn't notice - but of course next patchlevel is correct.

Actions #7

Updated by Mathias Brodala almost 8 years ago

  • Target version changed from 7.6.3 to next-patchlevel

Alright. :-)

Actions #8

Updated by Jo Hasenau almost 8 years ago

  • Assignee set to Jo Hasenau
  • Target version changed from next-patchlevel to 7.6.3

Currently we are working as a team at T3UXW16 on several translation/localization issues and we think we found a solution for this bug.

Actually there already is a method that does everything correctly and finds all related children, and actually we already use it when the user clicks on "Translate".
In this case the core will use the localize methods, which will nicely cascade through the relation chains and set everything correctly which would be still correct for the "Copy" mode, except one field.
The only difference between "Translated" and "Copied" elements is the fact, that a copy does not get an l10n_parent.

So our solution would be: We will introduce an optional parameter for the localization methods that will enable us to ignore the l10n_parent during that process.
We can stll use the same modal, the same AJAX calls and the same value arrays, but we will use localize in both cases, with the second case making use of the new parameter.

Actions #9

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from Accepted 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/47645

Actions #10

Updated by Gerrit Code Review almost 8 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #11

Updated by Gerrit Code Review almost 8 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #12

Updated by Gerrit Code Review almost 8 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #13

Updated by Birger Stöckelmann almost 8 years ago

This patch is working for me (works with gridelements and their children as well) but there is still a small caveat, because elements are copied into a wrong position.

Steps to reproduce:

1. Add content elements to the page in default language
2. Translate in copy mode
3. Add another content element in default language
4. Translate again with copy

After step 4 you will see the newly copied content element in a wrong position. (TYPO3 7.6.5, patched with this patch only).

Actions #14

Updated by Jo Hasenau almost 8 years ago

Could you please test, if the changed order happens also with the "translation" mode of the modal?
The patch makes use of the same methods but does not set the transOrigPointerField, so actually sorting should be the same.
If this is the case, we should file another issue for that problem.

Actions #15

Updated by Gerrit Code Review almost 8 years ago

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/47645

Actions #16

Updated by Ralph Brugger over 7 years ago

We've had the same problem.
With gridelements, CEs that are inside a gridelement won't be translated.
They appear in the FE but noch in the BE.
We've tried patch set 5 within TYPO3 7.6.9 and now it seems to work.

Actions #17

Updated by Benni Mack over 7 years ago

  • Target version changed from 7.6.3 to Candidate for patchlevel
Actions #18

Updated by Pascal Dürsteler over 7 years ago

Tried patchset 5 with 7.6.9 but could not verify this; A few elements are not copied at all or copied empty..

Actions #19

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/47645

Actions #20

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/47645

Actions #21

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/47645

Actions #22

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/47645

Actions #23

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/47645

Actions #24

Updated by Gerrit Code Review over 7 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #25

Updated by Gerrit Code Review over 7 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #26

Updated by Gerrit Code Review over 7 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #27

Updated by Gerrit Code Review over 7 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #28

Updated by Ralph Brugger over 7 years ago

I've just putted some code comments to the patch set 11.
Tested this again with patch 14:

Parse error: syntax error, unexpected ':', expecting ';' or '{' in ../typo3/sysext/core/Classes/DataHandling/DataHandler.php on line 2616

    protected function getUniqueCountStatement(
        string $value,
        string $table,
        string $field,
        int $uid,
        int $pid
    ): Statement {

=> ": Statement " Does not work with PHP 5.6

Parse error: syntax error, unexpected '.' in /typo3/sysext/core/Classes/DataHandling/DataHandler.php on line 3533

$queryBuilder
   ->select(...$fields)

=> "...$fields" Does not work with PHP 5.6

Parse error: syntax error, unexpected '.' in /typo3/sysext/core/Classes/DataHandling/DataHandler.php on line 4955

$result = $queryBuilder
    ->select(...$fileFieldArr)

=> "...$fileFieldArr" Does not work with PHP 5.6

Parse error: syntax error, unexpected '.' in /data/www/sites/bst-update/shared/typo3_src/typo3_src-7.6.10/typo3/sysext/core/Classes/DataHandling/DataHandler.php on line 6606

$result = $queryBuilder
  ->select(...GeneralUtility::trimExplode(',', $fieldList))

=> "...GeneralUtility" Does not work with PHP 5.6

same in:
Parse error: syntax error, unexpected '.' in /typo3/sysext/core/Classes/DataHandling/DataHandler.php on line 7107

PHP Version in this ticket ist set to 5.6.

Actions #29

Updated by Stefan Neufeind over 7 years ago

For master (8.x) we have PHP 7.0+. So that wouldn't be a problem and I'd appreciate to make use of improved syntax-possibilities there.
For 7.6 we'll need to adapt the code - but that's doable then.

Actions #30

Updated by Gerrit Code Review over 7 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #31

Updated by Gerrit Code Review over 7 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #32

Updated by Gerrit Code Review over 7 years ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #33

Updated by Gerrit Code Review over 7 years ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #34

Updated by Gerrit Code Review over 7 years ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #35

Updated by Gerrit Code Review over 7 years ago

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #36

Updated by Gerrit Code Review over 7 years ago

Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #37

Updated by Gerrit Code Review over 7 years ago

Patch set 22 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #38

Updated by Gerrit Code Review over 7 years ago

Patch set 23 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #39

Updated by Gerrit Code Review over 7 years ago

Patch set 24 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #40

Updated by Gerrit Code Review over 7 years ago

Patch set 25 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #41

Updated by Gerrit Code Review over 7 years ago

Patch set 26 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #42

Updated by Gerrit Code Review over 7 years ago

Patch set 27 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #43

Updated by Gerrit Code Review over 7 years ago

Patch set 28 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #44

Updated by Gerrit Code Review over 7 years ago

Patch set 29 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #45

Updated by Gerrit Code Review over 7 years ago

Patch set 30 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #46

Updated by Gerrit Code Review over 7 years ago

Patch set 31 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #47

Updated by Anja Leichsenring over 7 years ago

  • Sprint Focus set to On Location Sprint
Actions #48

Updated by Gerrit Code Review over 7 years ago

Patch set 32 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #49

Updated by Gerrit Code Review over 7 years ago

Patch set 33 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #50

Updated by Gerrit Code Review about 7 years ago

Patch set 34 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #51

Updated by Gerrit Code Review about 7 years ago

Patch set 35 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #52

Updated by Gerrit Code Review about 7 years ago

Patch set 36 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47645

Actions #53

Updated by Tymoteusz Motylewski about 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #54

Updated by Gerrit Code Review about 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/51109

Actions #55

Updated by Gerrit Code Review about 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/51109

Actions #56

Updated by Gerrit Code Review about 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/51109

Actions #57

Updated by Gerrit Code Review about 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/51109

Actions #58

Updated by Gerrit Code Review about 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/51109

Actions #59

Updated by Gerrit Code Review about 7 years ago

Patch set 6 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/51109

Actions #60

Updated by Gerrit Code Review about 7 years ago

Patch set 7 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/51109

Actions #61

Updated by Tymoteusz Motylewski about 7 years ago

  • Status changed from Under Review to Resolved
Actions #62

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF