Bug #79443

Translation Wizard translates already translated content elements

Added by Josef Glatz about 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2017-01-24
Due date:
% Done:

100%

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

Description

Problem/Description

Scenario

  • TYPO3 7 LTS (upgraded from former 6.2 LTS > Web was TYPO3 4.5 initally)
  • A content page with many content elements where only 2 ce's aren't translated
    • default lang is de
    • sys_language_uid 1 is en
  • mod.web_layout.allowInconsistentLanguageHandling = 0 which is the default for TYPO3 7 LTS
  • the t3_origuid and l18n_parent aren't always exactly the same for each of the translated content elements (they were already present before upgrading TYPO3 - maybe this information helps):
uid
        sys_language_uid
            t3_origuid
                     l18n_parent
---------------------------------------
570        1    118        118
571        1    119        119
562        1    408        408
821        1    576        820
1806    1    970        970
977        1    973        973
978        1    974        974
976        1    975        975
1812    1    1808    1808
2286    1    2285    2285
2290    1    976        2289
2294    1    2293    2293
2352    1    2294    2351

Reproduce

  1. Press the "Translate" button
  2. Preview the record summary: see the bug: already translated CEs are displayed in the record summary

Quickfix / Proposal

\TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository::fetchOriginLanguage:

Instead of . ' AND tt_content.t3_origuid = tt_content_orig.uid' use . ' AND tt_content.l18n_parent = tt_content_orig.uid' (https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_7-6/typo3/sysext/backend/Classes/Domain/Repository/Localization/LocalizationRepository.php#L40)

At time of issue creation

translate-button.png View (4.69 KB) Josef Glatz, 2017-01-24 15:46


Related issues

Related to TYPO3 Core - Feature #78169: Add field for the record translation mode (connected vs free) Closed 2016-10-07
Related to TYPO3 Core - Bug #78599: Copy localized content element leads to wrong reference, translation fails Closed 2016-11-07
Related to TYPO3 Core - Bug #83874: Localization manager wrongly chooses the same language to translate from as to translate to Closed 2018-02-13

Associated revisions

Revision a1abb8db (diff)
Added by Tymoteusz Motylewski about 3 years ago

[BUGFIX] Make LocalizationRepository handle copied records

Improve LocalizationRepository queries to handle case
when records were copied from another page (thus t3_origuid)
is pointing to records from the other page.

Now LocalizationRepository uses l10n_source field instead of t3_origuid.
Tests for LocalizationRepository covering the case were added.

Resolves: #79443
Resolves: #78599

Releases: master, 7.6
Change-Id: Ibae4a276ea814f0ce3d453cffef1d22afeff1eb9
Reviewed-on: https://review.typo3.org/51406
Tested-by: TYPO3com <>
Reviewed-by: Markus Mächler <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>
Reviewed-by: Daniel Goerz <>
Tested-by: Daniel Goerz <>
Reviewed-by: Tymoteusz Motylewski <>
Tested-by: Tymoteusz Motylewski <>

Revision ddec3235 (diff)
Added by Markus Klein over 1 year ago

[BUGFIX] Make LocalizationRepository handle copied records

Improve LocalizationRepository queries to handle case
when records were copied from another page (thus t3_origuid)
is pointing to records from the other page.

Now LocalizationRepository uses l10n_source field instead of t3_origuid.
Tests for LocalizationRepository covering the case were added.

Resolves: #79443
Resolves: #78599
Releases: master, 7.6
Change-Id: Ibae4a276ea814f0ce3d453cffef1d22afeff1eb9
Reviewed-on: https://review.typo3.org/57628
Tested-by: TYPO3com <>
Reviewed-by: Johannes Kasberger <>
Tested-by: Johannes Kasberger <>
Reviewed-by: Stefan Neufeind <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Łukasz Uznański <>
Tested-by: Łukasz Uznański <>
Reviewed-by: Tymoteusz Motylewski <>
Tested-by: Tymoteusz Motylewski <>

History

#1 Updated by Oliver Hader about 3 years ago

For TYPO3 CMS8 (master) a new field l10n_source has been introduced with issue #78169 - for TYPO3 CMS7 this however does not seem to be possible since it requires database modifications.
An alternative solution could be to integrate the process logic into the core of CMS7 and put the trigger and additional database field into a separate extension that has to be installed manually.

#2 Updated by Oliver Hader about 3 years ago

  • Status changed from New to Accepted
  • Priority changed from Must have to Should have

#3 Updated by Gerrit Code Review about 3 years ago

  • Status changed from Accepted to Under Review

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

#4 Updated by Tymoteusz Motylewski about 3 years ago

  • TYPO3 Version changed from 7 to 8
  • Sprint Focus set to Stabilization Sprint

#5 Updated by Tymoteusz Motylewski about 3 years ago

I can confirm this bug.
A side note, you can check if your database is not messed up (e.g. whether l18_parent field or t3_origuid field is correct) with this extension https://github.com/macopedia/mess_detector

#6 Updated by Gerrit Code Review about 3 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/51406

#7 Updated by Gerrit Code Review about 3 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/51406

#8 Updated by Gerrit Code Review about 3 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/51406

#9 Updated by Gerrit Code Review about 3 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/51406

#10 Updated by Tymoteusz Motylewski about 3 years ago

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

#11 Updated by Robert Vock almost 3 years ago

This bug still exists in TYPO3 7.6.19

#12 Updated by Gerrit Code Review over 1 year 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/57628

#13 Updated by Gerrit Code Review over 1 year 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/57628

#14 Updated by Gerrit Code Review over 1 year 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/57628

#15 Updated by Gerrit Code Review over 1 year 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/57628

#16 Updated by Gerrit Code Review over 1 year 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/57628

#17 Updated by Gerrit Code Review over 1 year 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/57628

#18 Updated by Gerrit Code Review over 1 year 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/57628

#19 Updated by Gerrit Code Review over 1 year ago

Patch set 8 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/57628

#20 Updated by Gerrit Code Review over 1 year ago

Patch set 9 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/57628

#21 Updated by Gerrit Code Review over 1 year ago

Patch set 10 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/57628

#22 Updated by Gerrit Code Review over 1 year ago

Patch set 11 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/57628

#23 Updated by Gerrit Code Review over 1 year ago

Patch set 12 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/57628

#24 Updated by Gerrit Code Review over 1 year ago

Patch set 13 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/57628

#25 Updated by Gerrit Code Review over 1 year ago

Patch set 14 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/57628

#26 Updated by Markus Klein over 1 year ago

  • Status changed from Under Review to Resolved

#27 Updated by Tymoteusz Motylewski over 1 year ago

  • Related to Bug #83874: Localization manager wrongly chooses the same language to translate from as to translate to added

#28 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF