Project

General

Profile

Actions

Bug #83586

closed

changing language of content-element in workspace the content-element still shows up under the previous language

Added by Michael Schütz over 6 years ago. Updated almost 3 years ago.

Status:
Rejected
Priority:
Must have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2018-01-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
workspace, language
Complexity:
Is Regression:
Sprint Focus:

Description

Changing language of content-element in workspace by drag&drop or by changing via dropdown-menu in editing-mask. The content-element still appears below it's previous language. In DB-table tt_content you can see that the field sys_language_uid of the placeholder record did not get updated.


Files

Workspace Step-1.png (412 KB) Workspace Step-1.png Michael Schütz, 2018-01-16 22:16
Workspace Step-2.png (422 KB) Workspace Step-2.png Michael Schütz, 2018-01-16 22:16
Workspace Step-3.png (425 KB) Workspace Step-3.png Michael Schütz, 2018-01-16 22:21
DB-view.png (74.4 KB) DB-view.png Michael Schütz, 2018-01-16 22:28
PageLayoutView.patch (2.53 KB) PageLayoutView.patch typo3/sysext/backend/Classes/View/PageLayoutView.php Michael Schütz, 2018-01-18 11:51
PageLayoutView.patch (2.8 KB) PageLayoutView.patch TYPO3 Version 8.7.9: typo3/sysext/backend/Classes/View/PageLayoutView.php Michael Schütz, 2018-01-18 15:06
Actions #1

Updated by Michael Schütz over 6 years ago

The bug is just visual. When workspace get's published language changes are correct transfered to the live-version. The problem arises in Class "PageLayoutView" in method "getTable_tt_content" when it loops over the language-array "$langListArr" starting at line:507. The content-records are selected of the current loop-language. The subsequent call of "getContentRecordsPerColumn" selects in a first step live-records of current loop-language and does in a second Step a workspace-overlay. But in workspace content-records have to be selected by there overlay-language.

Solution:
1: If backend is in workspace-view select content-records of all languages
2: Then loop over the array $contentRecordsPerColumn and do a workspace-overlay of each record
3: Now compare the overlay-language with the current loop-language
4: If loop-language and overlay-language are different unset the current record in array $contentRecordsPerColumn

I have added a patch file for TYPO3 Version 8.7.9: typo3/sysext/backend/Classes/View/PageLayoutView.php

Actions #2

Updated by Michael Schütz over 6 years ago

Just add new patch-file

Actions #3

Updated by Christian Kuhn over 3 years ago

  • Status changed from New to Needs Feedback

I did not reproduce, but I assume this issue still exists.

The problem however is a bit bigger and not only related to workspaces: Changing the language (sys_language_uid) of a record is almost always a bad idea: This easily destroys data integrity for the other fields (l10n_parent and l10n_source).

The real solution is to never allow editors (and admins!) to change the assigned language of a record, basically sys_lanugage_uid, l10n_source and l10n_parent should be 'internal' fields that are not exposed to editor interfaces (FormEngine or page module drag-drop). We would have loved to have that already, but it leads to issues with the '-1 all languages' settings, which has to be changed on a conceptual level before.

This is why the issues has not been fixed: We could probably adapt the page module to deal with this scenario more correctly, but in the end it should not be possible to switch a record to a different language, not even for records being edited in workspaces.

For now, we recommend to never expose these fields to editors (via access rights settings), and to not change the values as an admin.

I'll set the issue to 'needs feedback' for now to give you a chance for a response, and hope that we start working on the underlying issue at some point ...

Actions #4

Updated by Christian Kuhn almost 3 years ago

  • Status changed from Needs Feedback to Rejected

I'll set the issue to rejected for now: This is more about general language handling and workspaces needs to follow when we tackle the problem on language level.

Actions

Also available in: Atom PDF