Task #93496
closedRecordsXmlSitemapDataProvider Unknown column 'sorting'
0%
Description
If you want to create a sitemap of data records, you do this (according to the instructions) with the RecordsXmlSitemapDataProvider.
If the table of the data does not have the field 'sorting', an error is generated.
(There are actually tables that don't need sorting)
Fri, 12 Feb 2021 14:16:09 +0100 [ALERT] request="bb09da45742eb" component="TYPO3.CMS.Frontend.ContentObject.Exception.ProductionExceptionHandler": Oops, an error occurred! Code: 20210212141609f5e95aac - {"exception":"Doctrine\\DBAL\\Driver\\Mysqli\\MysqliException: Unknown column 'sorting' in 'order clause' in /home/xxx/www/xxx/typo3_src-10.4.12/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php:87
public function generateItems()
$sortField = $this->config['sortField'] ?? 'sorting';
Files
Updated by Richard Haeser almost 4 years ago
- Tracker changed from Bug to Task
- Status changed from New to Accepted
- Assignee set to Richard Haeser
In the end, the records needs to be ordered. So if you don't have the sorting
field, you can use the sortField
option in the config to define on which field the items need to be ordered. As sorting
is the most common field name for records that are sorted (most are IMHO), it would break a lot of XML sitemaps if we just remove this default to the sorting
field as now the majority of devs don't need to set this property.
What I will do however is try to improve the documentation a bit on this.
Updated by Richard Haeser almost 4 years ago
- Status changed from Accepted to Under Review
Updated by Richard Haeser over 3 years ago
- Status changed from Under Review to Closed
Documentation patch is merged