Project

General

Profile

Actions

Bug #103053

closed

Search and sorting in file list not working properly

Added by Kai Strecker 3 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-02-05
Due date:
% Done:

100%

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

Description

Bug 1: Search query is lost when changing sorting

Steps to reproduce

  1. Open file list in backend.
  2. Switch the view from "Tiles" to "List".
  3. Search for example for "jpg".
  4. Click on one of the column labels to change the sorting.

=> The search query is lost.

The same thing happens, if you click on the forward or backward pagination link at step 3.

Bug 2: Sorting by file size does not work

Also, sorting by file size does not work properly. This is, because the comparison is done with the "Collator" php class: https://github.com/TYPO3/typo3/blob/v12.4.10/typo3/sysext/filelist/Classes/FileList.php#L1556
The sorting is wrong, because the collator is not doing a natural numeric comparison. In my opinion, this can be fixed by adding this line:

$collator->setAttribute(\Collator::NUMERIC_COLLATION, \Collator::ON);

But maybe this should only be done, when sorting by file size? I am not sure, what other side effects this change would introduce...


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #103080: Lacking of file search input within link wizardClosed2024-02-08

Actions
Actions

Also available in: Atom PDF