Project

General

Profile

Actions

Task #93496

closed

RecordsXmlSitemapDataProvider Unknown column 'sorting'

Added by Mayer Patrick over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Category:
SEO
Target version:
-
Start date:
2021-02-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
Sprint Focus:

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

stacktrace.txt (1.94 KB) stacktrace.txt Mayer Patrick, 2021-02-12 14:17
Actions #1

Updated by Richard Haeser over 3 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.

Actions #2

Updated by Richard Haeser over 3 years ago

  • Status changed from Accepted to Under Review
Actions #3

Updated by Richard Haeser over 3 years ago

  • Status changed from Under Review to Closed

Documentation patch is merged

Actions

Also available in: Atom PDF