Problem/Motivation
1. Install the experimental Help Topics module.
2. Clear the cache. Visit an admin page and note that the breadcrumb is correct.
3. Go to admin/help and click on a help topic link.
4. Note that the breadcrumb there is Home > Administration > Help (also correct).
5. Now visit any other admin page. The breadcrumbs remain Home > Administration > Help on all pages. Not correct.
The reason is that the HelpBreadcrumbBuilder class does not set cache context correctly, so the Block system thinks that the breadcrumb block calculated for Help Topic pages is fine to use for all other pages.
Proposed resolution
Add cache context to the help breadcrumb, so that it will not be used for other pages.
Remaining tasks
Patch will be attached in first comment. Test included. Needs review/commit.
User interface changes
Breadcrumbs for admin pages will not be taken over by Help Topic breadcrumbs.
API changes
No.
Data model changes
No.
Release notes snippet
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | breadcrumb-code-plus-test.patch | 2.22 KB | jhodgdon |
| #2 | help_breadcrumb_test_only_fail.patch | 1.46 KB | jhodgdon |
Comments
Comment #2
jhodgdonHere is a test-only patch that fails, and a test-with-code patch that passes. Simple fix. We cache based on the URL minus the last level, just as the System module path-based breadcrumb builder does.
Comment #4
misc commentedLooks fine for me!
Comment #5
oknateNice find! I think this comment could use some improvement:
Maybe something like: "Verify that the HelpBreadcrumbBuilder class sets the cache context correctly. When visiting a new page it should have a new breadcrumb."
Comment #6
larowlanneat! didn't know about this one
Committed 00d8daf and pushed to 8.8.x. Thanks!