- Issue created by @tikaszvince
- π¨πSwitzerland saschaeggi Zurich
If Gin theme insist to override breadcrumb via a hook_preprocess_breadcrumb i suggest it should add proper cache tags and/or context to the $variables to reduce the chance of display the wrong cached values.
Please do not concatenate strings to display! Use the string translation.
Please feel free to open an MR to address these issues
- Status changed to Needs review
4 months ago 2:59pm 2 September 2024 - ππΊHungary tikaszvince
I've created a merge request with the requested changes.
- π¬π·Greece kostask
I could not reproduce the bug you mention. I get Edit Page/ Edit Article correctly.
Editing the Article bundle name to Article2 keeps the breadcrumb as Edit Article (instead of Edit Article2) so the cache tags of the bundle need to be added.I agree string translation should be used instead of concatenation though.
- ππΊHungary tikaszvince
On various cases the original problem still exists.
I try to add more cache tags to built breadcrumb. - π¬π§United Kingdom joachim
The problem is not cache tags, it's cache context.
After one visit to a node edit form, my cache_render table has an entry with this CID:
> entity_view:block:gin_breadcrumbs:[languages:language_content]=en:[languages:language_interface]=en:[route.book_navigation]=book.none:[theme]=gin:[user.permissions]=is-admin
So the next page -- whatever it is -- will get that same cache entry.
- Status changed to RTBC
about 1 month ago 1:43pm 5 November 2024 - π¬π§United Kingdom joachim
Latest version of the MR fixes the problem I've been seeing.
The t() issues seem to be fixed too.
- π¨πSwitzerland saschaeggi Zurich
Hey @tikaszvince π
Thanks for working on this ππ
I've left some code suggestions otherwise this LGTM.
Moving this back to needs work for now.Thank you
- ππΊHungary tikaszvince
Hi @saschaeggi,
Updated the MR with the new helper method placed in the same file. If that is not the right place for this function please move it.
- π¨πSwitzerland saschaeggi Zurich
Thank you, LGTM, I've fixed one small phpcs issue.
Let's wait for a community review that everything works as expected and afterwards we can move forward with merging this π€