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.
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
I can confirm that on Version 4.1.7
Issue still exists in 4.2.6
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
patch added BUT i'm not shure if there are any sideeffects please test
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.
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 :).
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.
Committed to SVN:
- TYPO3_4-2 (rev. 5724)
- Trunk (rev. 5725)
Also available in: Atom
PDF