Skip to content

Sorting error on copying translated contentElements  #500

Open

Description

@dkruse-atlantisdx

Hello,
i got an error report by a colleague, mentioning the english translation of a german page is sorted on top or at the bottom of the page.
After investigation this issue i found that the problem comes from the b13/container extension, and exists on multiple TYPO3 instances.
This occures since the version 2.0.0 of this extension.

We found out it has to do with the class B13\Container\Hooks\Datahandler\CommandMapBeforeStartHook
Using the class from v1.6.1 sort the translated contentElements correctly. We are currently using v2.3.6, where the translated element is sorted wrong.

The resulting "cmdmap" looks right, so i don't see why this is the cause.
Another colleague claims the error is on line 141 and should be:
if ($this->tcaRegistry->isContainerElement($record['CType'])) { continue; }

It seems the following target points to the last element inside of the container, instead of the container itself, which is the element before the element that we pasted into the page. That inserted contentElement could be any contentElement or a container.

Thanks for the extension and for looking into it.
Kind Regards
Daniel Kruse

Activity

  1. dkruse-atlantisdx commented on May 24, 2024

    @dkruse-atlantisdx
    Author

    Steps to reproduce:

    1. copy some Content Element with translation (connected mode)
    2. select a different page with translation (connected mode)
    3. paste element between container elements

    Actual result:

    1. pasted content element is in the correct spot
    2. translation of the content element is either on top or at bottom in page view and frontend

    Expected result:

    1. pasted content element is in the correct spot
    2. translated content element is in the same spot between existing elements
  2. DanielSiepmann commented on Jun 18, 2024

    @DanielSiepmann

    To me it looks like this is not necessary related to the language. It looks like a duplication of #458.

    I guess this bug got introduced via #149 with a1cc4de.
    With the following explanation:

     * element after a container
      * old: -uid of container is used (leeds to broken sorting)
      * new: -uid of last child in containers last column is used
    
  3. firmenpunkt commented on Jul 22, 2024

    @firmenpunkt

    A similar issue I also noticed, when I move a translated container element per drag and drop in page mode (connected mode) inside the same page. The translated element stays in the original position, the original element stays in de new position. Interestingly, only on the backend. It moves to the desired position on the frontend.
    Per trial and error I've found out that in my case, if I move the element from the oroginal position around, and i release it again at the same place, the translated element goes to the desired position on the backend. too.
    I don't know what happens in the database. The command suggested in #458 didn't help me, either.

  4. self-assigned this
    on Oct 30, 2024
  5. added a commit that references this issue on Dec 20, 2024
  6. liayn commented on Dec 20, 2024

    @liayn

    a1cc4de#diff-e83c9a53369a0fdfe0bbb24d68652192dcd70cfa7c252b211f2a01db9caef8abR67

    We have a sorting issue when translating content. Removing this line, seems to fix the issue.

  7. ttg-barbreit commented on Jul 17, 2025

    @ttg-barbreit

    this issue still persists in version 3.1.10
    When copying an element with existing translation into a page, also with existing translation, the translated version will appear at the top of the page in the backend. in the frontend the sorting is correct.

    if the element that is being copied has no translation and gets translated on the destination page the sorting is correct in the backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions