Solved: Navigation / Mega Menu is Missing When Varnish Cache is Activated in Magento 2

Solved: Navigation / Mega Menu is Missing When Varnish Cache is Activated in Magento 2

Megamenu is a drop-down menu with multi-level expansions that lets you display your website’s full navigation into a single menu. A mega menu allows visitors to reach even the deepest sections of a website through the main menu.

Megamenu is one of the most beneficial aspects to improve user experience as Jakob Nielsen explains, “By helping users find more, they’ll help you sell more.”

The mega menu navigation can disappear in some cases. One of the issues is when you activate the varnish cache in your Magento 2 store; the mega menu may disappear.

In those cases, use the below solution to show the mega menu in Magento 2 store.

Solution for Navigation / Mega Menu is Missing When Varnish Cache is Activated in Magento 2:

Remove the TTL attribute (ttl=”3600″) from default.xml file located at vendor/magento/module-theme/view/frontend/layout.

Now check in the frontend, Megamenu is now displaying in your store!

That’s easy, right?

If you have any doubts regarding this post, just mention them in the Comments section below.

I would be happy to help.

Feel free to share the solution with Magento Community via social media.

Thank You.

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

5
(based on 10 Reviews)

He is a Magento developer at Meetanshi with a jolly, extrovert, & friendly personality. He loves playing cricket and is a passionate foodie!

Leave a reply:

Your email address will not be published.