Actions
Bug #96589
closed['sys_category']['ctrl']['sortby'] = ''; removes the sql entry for sorting
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2022-01-19
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
The following entry in /TCA/Overrides/sys_category.php in an extension:
$GLOBALS['TCA']['sys_category']['ctrl']['sortby'] ='';
removes the field sorting from the sql definitions of the table sys_category. This results in a message in the datebase analyzer:
ALTER TABLE `sys_category` CHANGE `sorting` `zzz_deleted_sorting` INT DEFAULT 0 NOT NULL
Of course if you do so, TYPO3 will crash because the sorting field is needed for all database operations with sys_category.
The problem occurs if you want to change the default sorting of sys_category e. g.:
$GLOBALS['TCA']['sys_category']['ctrl']['sortby'] = null;
$GLOBALS['TCA']['sys_category']['ctrl']['default_sortby'] = 'ORDER BY title';
default_sorty is only considered when sortby is empty (null or '')
The problem exists in TYPO3 10 and 11.
Actions