Project

General

Profile

Actions

Bug #88534

closed

RecordsXmlSitemapDataProvider does not allow reversed sorting

Added by Markus Klein almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
SEO
Target version:
-
Start date:
2019-06-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

For things like news items you usually want those sorted DESC. This is not possible currently, which I consider a bug.

Actions #1

Updated by Chris Müller almost 5 years ago

Just curious, why do you want to sort the items in a XML sitemap? It's just a unordered list of pages as hint for the search engines for crawling. Sorting does not matter?

Actions #2

Updated by Markus Klein almost 5 years ago

For an RSS Feed.

(Otherwise the sorting option in general wouldn't be needed)

Actions #3

Updated by Gerrit Code Review almost 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61379

Actions #4

Updated by Gerrit Code Review almost 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61379

Actions #5

Updated by Richard Haeser over 4 years ago

There is a clear reason why the items are not sorted reversed. If there is a new item, it will make all pages of the sitemap change (the sitemaps are paginated). And it is best to keep the url's within the same sitemap link.

Why do you want to reverse sort news items in a sitemap? Do you have a specific use-case?

[EDIT] Sorry, see that you already mentioned your use-case in a comment. RSS has a clearly other purpose and you want other data as well. The RSS specification is also very different from the XML sitemap specification. So what is exactly the use-case?

Actions #6

Updated by Markus Klein over 4 years ago

Yes, RSS feed!
And I guess also google news sitemap

Actions #7

Updated by Markus Klein over 4 years ago

Why not using this for RSS? By settings a different template.

Actions #8

Updated by Gerrit Code Review over 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61379

Actions #9

Updated by Richard Haeser over 4 years ago

Adding the sorting direction is arguable, but the reason for using it for RSS is not a good one for me. It means that we always should keep in mind that people are misusing this feature for other purposes what makes decisions harder sometimes. I would really like this feature to stick with its purpose: being a XML sitemap for SEO purposes.

So personally I don’t like to have this option into the XML sitemap feature. If we want a good RSS option in core, we can easily create that feature especially for RSS feeds.

Actions #10

Updated by Markus Klein over 4 years ago

We dug deep in our internal history and couldn't find the reasoning why we tried to use this core feature anymore.
We kept using the previously existing things for RSS and other stuff.

So from the use-case point of view: I have no problem with abandoning this change.

In general though, if I can sort stuff, why can't I define the direction?

On XML generating stuff in general: Why duplicating a lot of code, if this thing for SEO already does, what is needed?

  • Fetch some records
  • Build detail links
  • Render them with an arbitrary template

That matches actually for any XML export one could imagine.

Actions #11

Updated by Gerrit Code Review over 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61379

Actions #12

Updated by Daniel Goerz over 4 years ago

  • Status changed from Under Review to New

Patch was abandoned

Actions #13

Updated by Richard Haeser over 4 years ago

I think this issue can be closed. Besides that with the introduction of https://review.typo3.org/c/Packages/TYPO3.CMS/+/61568 you can use the same code for different use cases and can implement your own features if you want.

Actions #14

Updated by Markus Klein over 4 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF