Bug #25216

Repositioning of translated CE in the list module replaces language ID

Added by Jo Hasenau over 9 years ago. Updated 6 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend User Interface
Target version:
-
Start date:
2011-03-01
Due date:
% Done:

100%

TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

In the list module you can click on the "re-position" icon to get into the "Move element" mode. There you see a structured overview of existing elements and their respective columns.

The problem is, that moving translated elements won't work, since the elements visible in this view are the default elements only. So when you position the element after or before on of these or put it into an empty column, the sys_language_uid of the element will be removed and it will show up in the default language.

(issue imported from #M17816)


Related issues

Related to TYPO3 Core - Bug #59901: Move records in list module kills sys_language_uid Closed 2014-06-26
Related to TYPO3 Core - Bug #14873: CE jumps from right to normal when moved in list mode Closed 2005-07-21
Related to TYPO3 Core - Bug #39054: Copied Content Elements incorrectly inherit language Accepted 2012-07-18
Related to TYPO3 Core - Bug #72988: losing Localization when moving elements (Typo 7.6.2) Closed 2016-01-28
Related to TYPO3 Core - Bug #87148: sys_language_uid is set to default when moving CEs via drag'n'drop Closed 2018-12-13

Associated revisions

Revision acff9da4 (diff)
Added by Christian Eßl 6 months ago

[BUGFIX] Keep language or colPos when moving a record in list module

When copying a tt_content record in list module, the DataHandler would
internally look up the 'copyAfterDuplFields' settings in TCA and ensure,
that those fields are copied from its new neighboring record.

In TYPO3 core, the 'copyAfterDuplFields' settings are only used by the
table tt_content with 'colPos,sys_language_uid' as its values.

This makes sense for copying records, but the same behaviour, that stems
from TYPO3s very early days, was also used when records where moved
around with the DataHandler. When an editor changes the position of a
tt_content record in the list module, the record would then always
automatically adopt the colPos/sys_language_uid of its new neighbour,
which is usually not expected or desired, and often leads to much
confusion and broken content grids.

The code responsible for 'copyAfterDuplFields' is now removed from
DataHandler::moveRecord_raw(), while retaining the behaviour for
DataHandler::copyRecord(). Moving around tt_content records in the
page module to different columns or languages is not affected by this
change, as the colPos/sys_language_uid changes there are set in a
separate update statement.

Resolves: #72988
Resolves: #59901
Resolves: #39798
Resolves: #25216
Resolves: #14873
Releases: master, 9.5
Change-Id: Ic9c57fe2712b0996bc7b53cce4bcdc275c2820cb
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63646
Tested-by: TYPO3com <>
Tested-by: Georg Ringer <>
Tested-by: Benni Mack <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Georg Ringer <>
Reviewed-by: Benni Mack <>
Reviewed-by: Oliver Hader <>
Reviewed-by: Anja Leichsenring <>

Revision f6016b3d (diff)
Added by Christian Eßl 6 months ago

[BUGFIX] Keep language or colPos when moving a record in list module

When copying a tt_content record in list module, the DataHandler would
internally look up the 'copyAfterDuplFields' settings in TCA and ensure,
that those fields are copied from its new neighboring record.

In TYPO3 core, the 'copyAfterDuplFields' settings are only used by the
table tt_content with 'colPos,sys_language_uid' as its values.

This makes sense for copying records, but the same behaviour, that stems
from TYPO3s very early days, was also used when records where moved
around with the DataHandler. When an editor changes the position of a
tt_content record in the list module, the record would then always
automatically adopt the colPos/sys_language_uid of its new neighbour,
which is usually not expected or desired, and often leads to much
confusion and broken content grids.

The code responsible for 'copyAfterDuplFields' is now removed from
DataHandler::moveRecord_raw(), while retaining the behaviour for
DataHandler::copyRecord(). Moving around tt_content records in the
page module to different columns or languages is not affected by this
change, as the colPos/sys_language_uid changes there are set in a
separate update statement.

Resolves: #72988
Resolves: #59901
Resolves: #39798
Resolves: #25216
Resolves: #14873
Releases: master, 9.5
Change-Id: Ic9c57fe2712b0996bc7b53cce4bcdc275c2820cb
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64137
Tested-by: TYPO3com <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Anja Leichsenring <>

History

#1 Updated by Alexander Opitz over 6 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.3)?

#2 Updated by Jo Hasenau over 6 years ago

Yes - behaviour is exactly as described.

#3 Updated by Alexander Opitz over 6 years ago

  • Category set to Backend User Interface
  • Status changed from Needs Feedback to New

#4 Updated by Riccardo De Contardi about 5 years ago

  • Status changed from New to Needs Feedback

Hi Jo, I have performed the following test on both 6.2.14 and 7.5-dev (latest master):

1) Enviroment

1.1) I have a backend layout like this for all pages:

backend_layout {
    colCount = 1
    rowCount = 2
    rows {
        1 {
            columns {
                1 {
                    name = my page col
                    colPos = 0
                }
            }
        }
        2 {
            columns {
                1 {
                    name = my other col
                    colPos = 2
                }
            }
        }
    }
}

1.2) Default language: italian;

Add a language (ID=1), english

1.3) TS setup:

config.linkVars = L
config.uniqueLinkVars = 1
config.sys_language_overlay = content_fallback
config.language = it
config.locale_all = it_IT
config.htmlTag_langKey = it-IT
config.sys_language_uid = 0

[globalVar = GP:L = 1]
config.language = en
config.locale_all = en_EN
config.htmlTag_langKey = en-EN
config.sys_language_uid = 1

[global]

1.4) TS config Home page:

mod.SHARED {
  defaultLanguageFlag = it
  defaultLanguageLabel = Italian
}

2) test execution:

2.1) Create a page (Title: "My page 3") and translate it in english ("My page 3 ENG")

Page Module > (I am on Default language) > my page col (colPos=0), create a new content element, text (title: "Bugtest 25216")

Page Module > switch to Languages mode > copy default content element in english (the content is still in colPos=0) (title "[Translate to English:] Bugtest 25216")

List module > "[Translate to English:] Bugtest 25216" > click on the icon "re-position content element" > move to "my other col " (colPos=2)

3) Result:

when I switch back to page module, the translated content element is in colPos=2 and still in english, so I think the issue is solved.

Do you think it is sufficient to consider it closed, or should I perform further tests? Thank you!

#5 Updated by Riccardo De Contardi about 5 years ago

  • Assignee set to Jo Hasenau

#6 Updated by Jo Hasenau almost 5 years ago

The problem is not about moving records to another column, but about moving records to a position between two other records. And it is still there in 7 LTS.
Since the visible records are always in the default language, the "move after" action does exactly the same stuff that happens when you sort with the up and down arrows in the list module.

Reason: copyAfterDuplFields contains sys_language_uid

I will set some related issues to clarify the problem.

#7 Updated by Riccardo De Contardi almost 5 years ago

  • Status changed from Needs Feedback to New

#8 Updated by Riccardo De Contardi over 2 years ago

  • Related to Bug #72988: losing Localization when moving elements (Typo 7.6.2) added

#9 Updated by Mona Muzaffar over 1 year ago

  • Related to Bug #87148: sys_language_uid is set to default when moving CEs via drag'n'drop added

#10 Updated by Gerrit Code Review 8 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63646

#11 Updated by Gerrit Code Review 8 months ago

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/c/Packages/TYPO3.CMS/+/63646

#12 Updated by Gerrit Code Review 8 months 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/c/Packages/TYPO3.CMS/+/63646

#13 Updated by Gerrit Code Review 8 months 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/c/Packages/TYPO3.CMS/+/63646

#14 Updated by Gerrit Code Review 8 months 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/c/Packages/TYPO3.CMS/+/63646

#15 Updated by Gerrit Code Review 6 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64137

#16 Updated by Christian Eßl 6 months ago

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

#17 Updated by Benni Mack 6 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF