Articles on: Magento 2 Pearl Theme User Guide

Navigation / Mega menu missing when Varnish Cache is activated with Magento 2

In some cases, when Varnish Cache is activated, the navigation/mega menu may disappear.

This occurs due to a known Magento 2 + Varnish issue.




Solution


To fix this, you need to remove the TTL attribute from Magento’s default layout file:


  1. Open the file:

/vendor/magento/module-theme/view/frontend/layout/default.xml


  1. Locate the following line:


ttl="3600"


  1. Remove the ttl="3600" attribute and save the file.


After this change, the navigation menu should reappear.





Reference


For more details, see the official Magento GitHub issue:

Magento 2 Issue #3421

Updated on: 16/09/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!