Closed ftrojahn closed 4 years ago
That settings specifies which fieldname is used to store the sorting. So if you set it to last_name that's where the sorting-values will be stored in. Works as designed. Please see the TCA-documentation. https://docs.typo3.org/m/typo3/reference-tca/master/en-us/Ctrl/Index.html
Bug Report
Current Behavior Trying to use
$GLOBALS['TCA']['tt_address']['ctrl']['sortby'] = 'last_name';
in Configuration/TCA/Overrides in an own sitepackage extension.So, IMHO we should get the backend list sorted by last_name field.
Error: When creating a new address record, all existing records get the number of the sorting field, e.g. 512, written to the last_name field (don't try this on your production system!).
Expected behavior/output last_name is left as-is.
Environment
Possible Solution The sorting field should only get populated in default case, i.e. if `$GLOBALS['TCA']['tt_address']['ctrl']['sortby'] == 'sorting' or default value.