If you append the page title to the breadcrumb, page title is not refreshed when changing page. Because #cache context only based on user.permissions. Adding #cache context based on url fix this issue. Patch follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

flocondetoile created an issue. See original summary.

flocondetoile’s picture

Title: Cache issue for page title added in breadcrumb » Cache issue for page title append to breadcrumb
Status: Active » Needs review
FileSize
522 bytes

The patch.

xeM8VfDh’s picture

+1

I'm seeing this issue as well. When I clear the cache and go to "/about/page1", the breadcrumb accurately shows "About / Page One", but then when I go to /about/page2, the breadcrumb remains as "About / Page One" instead of updating to "About / Page Two". After clearing the cache, the first child that I click under a given parent path shows the proper page title in the breadcrumb, but then that title gets stuck and is used when visiting all other pages directly under that parent path. Clearing cache resets it, but it's easily replicable after that.

I'm using a sub-theme of Bootstrap 8.x-3.0-beta3

Michèle’s picture

Patch #2 works for me like a charm! Thank you!

markhalliwell’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Dhruv Panchal’s picture

Hello,

Please use this drupal function to exclude cache : drupal_page_is_cacheable(FALSE);

Thanks,
Dhruv Panchal