Bug #103053
closedSearch and sorting in file list not working properly
100%
Description
Bug 1: Search query is lost when changing sorting¶
Steps to reproduce¶
- Open file list in backend.
- Switch the view from "Tiles" to "List".
- Search for example for "jpg".
- 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...
Updated by Gerrit Code Review 6 months ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82826
Updated by Daniel Siepmann 6 months ago
- Related to Feature #103080: Lacking of file search input within link wizard added
Updated by Gerrit Code Review 6 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82826
Updated by Gerrit Code Review 6 months ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82826
Updated by Gerrit Code Review 6 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/82850
Updated by Oliver Bartsch 6 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset b0f4191048ac0ba2bda96411d7da469c83b9b2fd.