Closed maxime-rainville closed 3 months ago
I haven't look at the underlying cause. I'll see if there's a quick fix there tonight.
Don't have fix yet, but I think I narrowed the problem down a bit.
The problem is only apparent on PJAX request. After step 7, if you refresh, your breadcrumb will look like "Page / First Level / Second Level / Third Level". That's probably the correct end state.
Part of the problem is in the interrelation between CMSMain::Breadcrumbs
and CMSPageController::Breadcrumbs
When doing a regular request, CMSMain will got through this if
statement. updateBreadcrumbs
will be called with an array containing only the a "Pages" link.
https://github.com/silverstripe/silverstripe-cms/blob/7e10f298177b08b84723811467aa20baf04ad9e7/code/Controllers/CMSMain.php#L1058-L1070
When doing a PJAX request, CMSMain will skip the previous if
statement and go through this logic instead.
This time updateBreadcrumbs
will be called with the list of all the ancestors. Basically doubling the list.
I've update the expected behaviour to match have a "Pages" link in the breadcrumb.
PR merged. This will be automatically tagged by GitHub Actions.
Module version(s) affected
4.13.13 and 5.2.2
Description
When navigating the sitetree in list view, the "crumbs" in the "breadcumbs" get doubled up.
How to reproduce
Expected: The breadcrumb looks like
First Level / Second Level / Third Level
Actual: The breadcrumb looks likeFirst Level / Second Level / Third Level / First Level / Second Level / Third Level
Possible Solution
No response
Additional Context
No response
Validations
silverstripe/installer
(with any code examples you've provided)Pull request