Project

General

Profile

Actions

Bug #17876

closed

Sorting of child records is inverted on moving parent record to different page

Added by Martin Borer almost 17 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2007-12-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If you want to move a IRRE record with manual sorted child records, the sorting of the child records will be inverted.

First is last, last is first and so on...

(issue imported from #M6875)


Files

T3X_test_6875-0_0_0-z-200904241725.t3x (10.9 KB) T3X_test_6875-0_0_0-z-200904241725.t3x Administrator Admin, 2009-04-24 17:26
patch_6875.diff (615 Bytes) patch_6875.diff Administrator Admin, 2009-04-24 17:48
6875_v2.diff (726 Bytes) 6875_v2.diff Administrator Admin, 2009-06-01 12:48
0006875_v3.patch (634 Bytes) 0006875_v3.patch Administrator Admin, 2009-07-16 23:48
0006875_v4.patch (584 Bytes) 0006875_v4.patch Administrator Admin, 2009-07-16 23:56

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #17470: Copying of an IRRE Parent object reverses the Childs orderClosedChristian Kuhn2007-07-13

Actions
Actions #1

Updated by Benno Weinzierl almost 16 years ago

I can confirm that on Version 4.1.7

Actions #2

Updated by Tobias Liebig over 15 years ago

Issue still exists in 4.2.6

Actions #3

Updated by Tobias Liebig over 15 years ago

attached small extension to reproduce the behaviour

  • install extension
  • go into the list module
  • create a "parents" record
    • add serveral "children" to the new parent record (at least 3)
    • give them certain names so you can check the correct order later
  • "cut" the parent record from list modul
  • go to another page and paste the record
  • edit it and see that the order of the children is reversed
Actions #4

Updated by Nabil Saleh over 15 years ago

patch added BUT i'm not shure if there are any sideeffects please test

Actions #5

Updated by Christian Kuhn over 15 years ago

Thanks Tobias for the test extension.
Nabil, your patch works, thanks.

I uploaded another version that doesn't use array_reverse, but some logic very similar to what was done in #16603. I don't really like the array_reverse, it just looks a bit unmotivated there. My version makes a bit better use of the given API.
So choosing v1 or v2 is a matter of taste, maybe Oliver could state his preference.

Nabil, you could choose one version and send it (together with test extension and reproduce howto) to core-list. Target branches are 4.2 and trunk.

Actions #6

Updated by Nabil Saleh over 15 years ago

sent to corelist. sorry for being late but bugtracker seemed to have a problem in sending mails so I haven't been informed about updates.

Thx for your patch it's indeed better in readability and maby even in logic :).

Actions #7

Updated by Oliver Hader over 15 years ago

The v3-patch is just educational how to use v2 without an if-block... ;-)
However, I prefer the array_reverse() patch since it does not produce that many lookups to determine the correct page ID for each child record.

Actions #8

Updated by Oliver Hader over 15 years ago

Committed to SVN:
  • TYPO3_4-2 (rev. 5724)
  • Trunk (rev. 5725)
Actions

Also available in: Atom PDF