Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in sorting of pages in automaticBreadcrumbSchemaGeneration #32

Closed
davidsteeb opened this issue Feb 7, 2020 · 0 comments · Fixed by #33
Closed

Bug in sorting of pages in automaticBreadcrumbSchemaGeneration #32

davidsteeb opened this issue Feb 7, 2020 · 0 comments · Fixed by #33
Assignees
Labels
bug Something isn't working

Comments

@davidsteeb
Copy link
Contributor

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)
davidsteeb added a commit to b13/schema that referenced this issue Feb 7, 2020
The rows in $rootLine should not be resorted but reversed to generate a breadcrumb in valid order.

Resolves: brotkrueml#32
@brotkrueml brotkrueml self-assigned this Feb 8, 2020
@brotkrueml brotkrueml added the bug Something isn't working label Feb 8, 2020
brotkrueml added a commit that referenced this issue Feb 9, 2020
brotkrueml added a commit that referenced this issue Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants