- π©πͺGermany stefan.korn Jossgrund
I also experienced this issue, little different. All of a sudden menu breadcrumb stopped working. Finally found out that it was related to facet pretty paths and Search API. There was a node that had the same URL Alias as a search display. As soon as I renamed the node and cleared the cache, menu breadcrumb was working again.
It seemed that facet pretty paths somehow added its query parameters to all node requests and thus menu breadcrumb did not find itself responsible anymore (applies method) for any nodes. Strange enough that this kills all node breadcrumbs ...
- π¨π¦Canada phjou Vancouver π¨π¦ πͺπΊ
I am also experiencing something similar, but in case I identified that the breadcrumb breaks everytime I visit a node.
Example:
-- Visit custom route, breadcrumb show
-- Visit node
-- Visit same custom route, breadcrumb disappearsAnd I need to flush the cache in order for the breadcrumb to reappear on the custom route.
- Status changed to Postponed: needs info
10 months ago 9:04pm 29 March 2024 - π³πΏNew Zealand xurizaemon Εtepoti, Aotearoa π
There is a Menu Breadcrumb fix related to route parameter matching in π Wrong breadcrumb due to route alterations RTBC which might be of interest. Thanks for linking #2875276: Breadcrumbs disappears when starting with front-page after cache rebuild (for anonymous user). β as well Nic.
- Assigned to duaelfr
- Status changed to Needs work
5 months ago 9:09am 6 September 2024 - π«π·France duaelfr Montpellier, France
I faced this issue too but a bit different as it was not language related but user related.
I think I found steps to reproduce and the underlying cause of this.Steps to reproduce
- Create three pages: /test1, /test2 and /test3 (paths are important)
- Add two pages to the main menu: [root] > test2 > test3 (test1 is not in the menu)
- Clear all caches
- Access /test1 - expected breadcrumb: [Home]
- Access /test2 - expected breadcrumb: [Home] > test2
- Access /test3 - expected breadcrumb: [Home] > test2 > test3
Current results:
- Breadcrumb for /test1: [Home]
- Breadcrumb for /test2: [Home]
- Breadcrumb for /test3: [Home]
Note: [Home] only shows if breadcrumbs are configured that way. If they are not, the breadcrumb just disappear.
Why is that?
This seems to be related to the way Core caches its own breadcrumbs. The way Core builds its breadcrumbs only needs to know the parent path of the current page. That's why they declare
url.path.parent
as a cache context and noturl.path
like Menu Breadcrumb does. What happens is that if you first load a page where the breadcrumb is not managed by Menu Breadcrumb, then the breadcrumb block will be held in cache for every other pages sharing the same parent path. While usingurl.path.parent
is a nice optimization in the Core's breadcrumbs management, it's what's causing our issue here. - Merge request !22Issue #3230481: fix breadcrumbs not being handled bu the module until cache clear in some cases β (Merged) created by duaelfr
- Issue was unassigned.
- Status changed to Needs review
5 months ago 9:12am 6 September 2024 - π«π·France duaelfr Montpellier, France
As you can see in !22, the fix is quite simple and I believe it would also fix the original issue explained in the IS.
- πΊπΈUnited States nicxvan
My god, all this time...
I'll add this to the site and test. - πΊπΈUnited States cYu
I was tasked with debugging some quirky breadcrumb issues this week, and I wasn't able to reliably replicate the problem until I came across the details in #15. With that info, I was able to get my local site into the state of having invalid breadcrumbs and can confirm that the fix in !22 has resolved my issues.
@duaelfr: Thanks for the patch and the detailed explanation. The timing of cache clears, our menu structure, and the order of pages visited meant that we hadn't been seeing this outside of production, but what you've described aligns with what I'm seeing (not related to language).
- πΊπΈUnited States nicxvan
This looks great!
RTBC also hid the old MR that didn't work for me.
- Status changed to RTBC
5 months ago 3:08pm 11 September 2024 - πΊπΈUnited States nicxvan
nicxvan β changed the visibility of the branch 3230481-breadcrumbs-disappear-until to hidden.
- Status changed to Needs work
5 months ago 3:18pm 11 September 2024 - πΊπΈUnited States nicxvan
On second thought you probably want to vary on language and route too.
- πΊπΈUnited States Greg Boggs Portland Oregon
Adding a patch of the current MR for testing purposes
- πΊπΈUnited States nicxvan
@greg-boggs let me know on slack he tested that context and it is not needed.
RTBC again
- Status changed to RTBC
5 months ago 6:25pm 11 September 2024 - πΊπΈUnited States ben.hamelin Adirondack Mountains, NY
Good morning! Just chiming in here, this fixed an issue we were dealing with where the breadcrumb was being driven by the assignment to a Group. Alias was derived from the group path, but breadcrumb was being cached. Thanks everyone!
-
xurizaemon β
committed d0397b57 on 2.0.x authored by
duaelfr β
Issue #3230481 by nicxvan, greg boggs, duaelfr, sutharsan, renatog,...
-
xurizaemon β
committed d0397b57 on 2.0.x authored by
duaelfr β
- π³πΏNew Zealand xurizaemon Εtepoti, Aotearoa π
Thanks all! And thanks @nicxvan for the nudge to land this.
- Status changed to Fixed
2 months ago 5:29pm 13 November 2024 Automatically closed - issue fixed for 2 weeks with no activity.