Breadcrumb does not appear on the page when node is added using menu interface until cache is cleared.

Steps to reproduce the issue:

  1. Create a content.
  2. Go to Structure > Menu
  3. Edit main menu
  4. Add new link or edit existing link
  5. Use the newly created content to add or edit the menu item.
  6. Visit the new content.

Assumptions:
Menu Breadcrumb module is enabled and configured to use main menu.

Comments

adhariwal created an issue. See original summary.

adhariwal’s picture

adhariwal’s picture

rphair’s picture

I wasn't expecting to verify this, since we have really whipped the caching horse before (https://www.drupal.org/node/2827653), but I have just verified this on a brand new site running menu_breadcrumb 8.x-1.0 and Drupal 8.2.6.

What did we miss? Did something change recently in the menu plugins or cache API? A number of people have tested this code with and without caching and it all appeared to be working perfectly. I'll try to attract the attention of the people who helped in that thread since I am still no expert on caching.

Note comment #20 in that thread which states, I believe realistically, that it's beyond the scope of this module to work around any cacheability problems in MenuLinkInterface. Unless there is a coding flaw with this module, or breadcrumb cache tags declared incorrectly, this might have to be "postponed" pending a relevant core fix (we have also had to do this with https://www.drupal.org/node/2820206).

rphair’s picture

rphair’s picture

Assigned: Unassigned » rphair

no other reports of this happening that I have seen: continuing investigation as time permits, but in the meantime if anyone else has seen this issue please post any detailed observations here.

rphair’s picture

Very likely this will be linked to a core issue, if we can't find that this is fixed in upcoming 8.3 ... I'll update ASAP once I can find and/or create an issue for caching support of menu plugins.

rphair’s picture

Status: Active » Closed (cannot reproduce)

Upgraded the 2 sites I saw this on to Drupal 8.2.7 today, collecting information for a suspected core issue, and found I can no longer reproduce the bug. I am pretty sure I saw this on 8.2.5 but I can no longer contrive any UI menu link chance that isn't reflected in the cached & displayed breadcrumbs.

If this bug is still seen on any site running 8.2.7 or newer, please post more details here.

rphair’s picture

We have a report this is related to an upstream problem of MenuLinkContent plugins not generating cache tags, as late as Drupal 8.4. Those cache dependencies are now manually added as a workaround in dev version or with 8.x-1.2 plus patch at 2887053->#3. Please test & if reports of fixing all caching problems will release as 8.x-1.3.