Bug #83586

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

Added by Michael Schütz over 1 year ago. Updated over 1 year ago.

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

0%

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.

Workspace Step-1.png View (412 KB) Michael Schütz, 2018-01-16 22:16

Workspace Step-2.png View (422 KB) Michael Schütz, 2018-01-16 22:16

Workspace Step-3.png View (425 KB) Michael Schütz, 2018-01-16 22:21

DB-view.png View (74.4 KB) Michael Schütz, 2018-01-16 22:28

PageLayoutView.patch View - typo3/sysext/backend/Classes/View/PageLayoutView.php (2.53 KB) Michael Schütz, 2018-01-18 11:51

PageLayoutView.patch View - TYPO3 Version 8.7.9: typo3/sysext/backend/Classes/View/PageLayoutView.php (2.8 KB) Michael Schütz, 2018-01-18 15:06

History

#1 Updated by Michael Schütz over 1 year 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

#2 Updated by Michael Schütz over 1 year ago

Just add new patch-file

Also available in: Atom PDF