I am having an issue with breadcrumbs on Magento EE

The problem is: when multiple pages are being processed by FPC the CMS page picks up breadcrumb title from another page.

e.g. if http://www.domain.com/cms-page and http://www.domain.com/category.html were loading together in different tabs

the CMS page will show Home / Category Name instead of Home / CMS Page breadcrumb.

If FPC is disabled everything works correctly. I debugged the code and the variables are picking up correct breadcrumb however when the page is rendered from cache it picks up incorrect breadcrumb.

The problem seems to lie in FPC but I am unable to identify the exact problem or its solution.

Any help would be highly appreciated.

  • bumping again since no one got a chance to review this earlier :-| – Zain Baloch May 25 '16 at 14:27
  • Did you ever resolve this? I am having similar problems and all attempts at dynamic blocks, setting cache lifetime on the block, clearing cache settings, etc do nothing. – Jon Holland Jul 12 '16 at 10:49
  • Yes @JonHolland I was able to fix this. I will gather and write down details as an answer in next few hours. – Zain Baloch Jul 13 '16 at 14:28
  • @JonHolland please see the answer below, and don't forget to vote it up if you found it to be useful. :) – Zain Baloch Jul 13 '16 at 20:05

I had tried a lot of different things but none of them seemed to override Breadcrumbs block. It was still being cached by FPC.

So here is the solution which i implemented to fix my issues:

  1. Created a new extension named CacheBust which overrides BREADCRUMBS_BLOCK and than modifies getCacheKeyInfo function
  2. Added microtime() in getCacheKeyInfo() to avoid it from being cached

Download Full Extension

Just paste the code in your app, clear Config, FPC, Block caches and its ready to be used.

  • Hi Zain, thanks for your efforts on this. I think I worked out the cause of the problem. I was trying to modify the breadcrumbs for the product which could be reached by more than one route and therefore the cached breadcrumb path may be incorrect. However, whilst I managed to remove the breadcrumbs from the FPC the breadcrumbs then became blank. This I diagnosed as being because the rest of the product page was cached and therefore did not call the functions to add the items to the breadcrumbs. The breadcrumbs not being independent but modified by the individual blocks e.g. category/product. – Jon Holland Jul 14 '16 at 15:23
  • Won't this cause the block not to be Block_Cached as well? I'd prefer a solution that only causes the block not to be cached by FPC, seems like this is a way to do that: blog.rakshazi.cf/… – OZZIE Sep 15 '17 at 11:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.