Project

General

Profile

Actions

Bug #98256

closed

l10n_mode: exclude not properly working in workspaces

Added by Armin Vieweg about 2 years ago. Updated 3 months ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2022-09-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When you are in e.g. in a draft workspace and you change a property of a record which has l10n_mode set to exclude, TYPO3 does not set the value of the translations, properly. Those values remain untouched. You can test it with the "layout" field of pages.

When updating in LIVE workspace, all translation get the new layout value set.
When in e.g. draft workspace, only the default language record gets changed.

When publishing to LIVE, those wrong values remain in place. You need to update the value in LIVE workspace, to get proper results.


Related issues 1 (1 open0 closed)

Is duplicate of TYPO3 Core - Task #80640: Enhance workspace handling of language synchronizationUnder ReviewOliver Hader2017-04-02

Actions
Actions #1

Updated by Oliver Hader about 2 years ago

  • Related to Task #80640: Enhance workspace handling of language synchronization added
Actions #2

Updated by Armin Vieweg about 2 years ago

I also discovered a related issue with Extbase:

I created an Extbase Repo pointing to pages table. In one findBy... method I added a constraint for the Doktype of page.

- But instead of checking the Doktype of records in current workspace, it uses the value from the published page in LIVE workspace.
- When the page is NOT published to LIVE, it works as expected
- It seems only to affect properties, with l10n_mode: exclude set (like "layout" or "doktype")

Actions #3

Updated by Riccardo De Contardi 6 months ago

I tried the following test on TYPO3 13.2.0-dev (latest main)

Prerequisites

  • TYPO3 with two languages: Italian (Default, ID=0) and English (ID=1)
  • a "Draft" Workspace
  • A simple TypoScript template like:
page = PAGE
page {
  5 = TEXT
  5 {
      data = field : title
      wrap = <h1>|</h1>
    }

  6 = TEXT
  6.data = field:layout
  6.wrap = <h2>Layout: | </h2>
}

Test procedure

1) Create a page "Test" in Italian (default language ID=0)
2) Translate the page in English and rename it "Test ENG"
3) Edit the italian version of the page and set the Frontend Layout [layout] field: "Layout 1"
4) Save and preview the page

Result 1 (preview of the "LIVE" workspace)

  • the Italian page Test has Layout:1 (OK)
  • the English page Test ENG has Layout:1 (OK)

5) Switch to "Draft" workspace
6) Edit the italian version of the page and set the Frontend Layout [layout] field: "Layout 3"
7) Save and preview the page

Result 2 (preview of the "Draft" workspace)

  • the Italian page Test has Layout:3 (OK)
  • the English page Test ENG has Layout:3 (OK)

Is a different test necessary?

Actions #4

Updated by Markus Klein 3 months ago

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

We run into the same issue with a custom field on the pages table, which is also l10n_mode=exclude. (also on v11)

This is extremely bad for editors, because they have absolutely no means to work around this issue.

Actions #5

Updated by Markus Klein 3 months ago

The reason seems to be that the workspace-version of the page translation has its parent set to the UID of the live-version of the default language page.

\TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor::fetchDependentElements

tries to find the translations, but does not find them due to searching for translations pointing to the workspace-version of the default language.

Probably t3_origuid of the workspace-version must be used to search for translated pages in the workspace.

Example:

uid sys_language_uid l10n_parent t3_origuid slug
1 0 0 0 live EN
2 1 1 0 live DE
3 0 0 1 ws1 EN
4 1 1 2 ws2 DE

With this demo-data it would search for dependencies by using uid 3, which will not reveal record uid 4, as it points to parent with uid 1.

Actions #6

Updated by Markus Klein 3 months ago

  • Status changed from Accepted to Closed

Closing as duplicate of #80640.

Actions #7

Updated by Markus Klein 3 months ago

  • Is duplicate of Task #80640: Enhance workspace handling of language synchronization added
Actions #8

Updated by Markus Klein 3 months ago

  • Related to deleted (Task #80640: Enhance workspace handling of language synchronization)
Actions

Also available in: Atom PDF