Bug #83572

Changed behaviour for uniqueInPid/unique in translated records

Added by Jonas Renggli over 1 year ago. Updated 3 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2018-01-15
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Starting with TYPO3 8 LTS the behaviour for TCA's uniqueInPid/unique setting has changed when used in a field exluded from translation.
In our extension we're using a field with a technical key that needs to be equal independent of the language used.

Actual behavior
Translated field values get a numeric suffix. E.g.
  • myvalue
  • myvalue0
  • myvalue1
  • ...
    This suffix is not visible in the backend as the field is excluded from translations but considered in the frontend.

Expected behavior
Translated field values excluded from translation ('l10n_mode' => 'exclude') shouldn't be altered.

Steps to reproducs

  • TCA
    'key' => [
        ...
        'l10n_mode' => 'exclude',
        'config' => [
            'type' => 'input',
            'size' => 40,
            'eval' => 'uniqueInPid',
        ],
    ],
    
  • Create element in default language
  • Translate this element to another language
  • Check in frontend or database for altered values

Related issues

Duplicated by TYPO3 Core - Bug #84267: Unique evaluation does not work with l10n_mode=exclude Closed 2018-03-14
Duplicated by TYPO3 Core - Bug #84666: Page alias is changed for translated pages Closed 2018-04-08

Associated revisions

Revision 09b94a99 (diff)
Added by Andreas Wolf 11 months ago

[TASK] Add test for (wrong) unique eval handling in pages:alias

Change-Id: Ie47dbc9153d8a4dcbde15a7eb61c207bbcc34480
Resolves: #86780
Related: #84267
Related: #83572
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/57322
Tested-by: TYPO3com <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

Revision dd6713fe (diff)
Added by Christoph Lehmann 11 months ago

[BUGFIX] Ignore unique evaluation in l10n_mode exclude

The l10n_mode "exclude" explains to copy the field value from
source language, so unique evaluation should be ignored for
translated records.

Resolves: #84267
Resolves: #83572
Releases: master, 8.7
Change-Id: I6a086cb1fc447dda2cbcfe27f33ba9f3dd714f53
Reviewed-on: https://review.typo3.org/56151
Tested-by: TYPO3com <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

History

#1 Updated by Susanne Moog over 1 year ago

  • Category set to DataHandler aka TCEmain

#2 Updated by Oliver Hader over 1 year ago

  • Is Regression set to Yes

#3 Updated by Oliver Hader over 1 year ago

  • Status changed from New to Accepted

#4 Updated by Andreas Wolf over 1 year ago

  • Duplicated by Bug #84267: Unique evaluation does not work with l10n_mode=exclude added

#5 Updated by Susanne Moog over 1 year ago

  • Duplicated by Bug #84666: Page alias is changed for translated pages added

#6 Updated by Gerrit Code Review over 1 year ago

  • Status changed from Accepted to Under Review

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

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

#8 Updated by Gerrit Code Review 11 months 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/56151

#9 Updated by Christoph Lehmann 11 months ago

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

#10 Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed

#11 Updated by Lorenz Ulrich 3 months ago

Is it correct that this was then only applied to master/v9? Is there a reason why it wasn't backported to v8?

#12 Updated by Lorenz Ulrich 3 months ago

For those interested: The patch at https://github.com/TYPO3/TYPO3.CMS/commit/dd6713fed010185b18dccd12cc9d5ae59e6f2375.patch applies to TYPO3 8.7 if the lower part (patching GetUniqueTranslationTest.php) is removed.

Also available in: Atom PDF