Project

General

Profile

Actions

Bug #17404

closed

Sorting of remaining section elements in flexforms fails after deleting a section element

Added by Jens Köster over 17 years ago. Updated about 13 years ago.

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

0%

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

Description

How to reproduce it?

1. Create a FCE containig a section/array and fill it up with content, let's say
Element 1
Element 2
Element 3
Element 4

2. Delete Element 2 (click the delete checkbox and click the save button).

3. Now try to sort the remaining elements to reverse order:
Element 4
Element 3
Element 1

There will be some strange behaviour during this process.

What's going wrong?
Sorting ist done by using class.t3lib_tcemain.php -> _MOVE_FLEX_FORMdata().
If you move an element up/down, the element ist swapped with its adjacent element ($key+/-1).
Deleting ist done by using class.t3lib_tcemain.php -> _DELETE_FLEX_FORMdata().
It is done by simply using unset(). The adjacency ($key+/-1) is not maintained during this process, which causes the error.

The patch fixes this loss of adjacency simply by rearranging all indices before using unset().

(issue imported from #M5828)


Files

patch.diff (531 Bytes) patch.diff Administrator Admin, 2007-06-20 14:30
Actions #1

Updated by Jens Köster over 17 years ago

If deleting multiple etries the patch does not work because of a indices missmatch after the deletion of the first element. :( Any ideas?

Actions #2

Updated by Andreas Wolf about 13 years ago

  • Status changed from New to Closed
  • Target version deleted (0)

Has been fixed in the meantime.

Actions

Also available in: Atom PDF