brotkrueml / schema

TYPO3 extension providing an API and view helpers for schema.org markup

Home Page:https://extensions.typo3.org/extension/schema

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug in sorting of pages in automaticBreadcrumbSchemaGeneration

davidsteeb opened this issue · comments

Sorting the rootLine in BreadcrumbListAspect.php results in an array sorted by pid and does not reflect the hierarchical structure of the rootline. The exepected behaviour would be to reverse the order of the entries in $rootLine, not to resort the rows.

Example structure:
Home (UID 1, PID 0)
Page 1 (UID 2, PID 1)
Subpage 1 (UID 33, PID 2)
Sub-Subpage 2 (UID 22, PID 33)
Sub-Sub-Subpage 4 (UID 111, PID 22)

Expected Breadcrumb Listitems:

  • Page 1, Position 1
  • Subpage 1, Position 2
  • Sub-Subpage 2, Position 3
  • Sub-Sub-Subpage 4, Position 4

Resulting now with \sort(&$rootLine);:

  • Page 1 (pages.pid 1)
  • Subpage 1 (pages.pid 2)
  • Sub-Sub-Subpage 4 (pages.pid 22)
  • Sub-Supage 2 (pages.pid 33)