5

In Magento 2.2.4 CommunityOrEnterprise edition default menu not appear on home page when enabled Varnish Cache.

Actually problem is related to Varnish Cache if I set Varnish Cache from Store -> Configuration -> Advanced -> System -> Full page cache -> Caching Application Set to **Varnish Cache** then menu is not displaying.

If I set to 'Built-in cache' then it's working fine.

enter image description here

But on other all pages it's appear.

enter image description here

I checked and found that JS is not showing in inspect element on home page, so reason for this menu is not displaying.

in inspect element on home page showing like this

<esi:include src="http://127.0.0.1/rb-ee/page_cache/block/esi/blocks/%5B%22catalog.topnav%22%5D/handles/WyJkZWZhdWx0IiwiY21zX2luZGV4X2luZGV4IiwiY21zX3BhZ2VfdmlldyJd/"></esi:include>

Can anybody know it is necessary to select Varnish Cache (Magento Enterprise Edition 2.2.4) and what happens if we not select Varnish Cache?

Any help would be appreciated. Thanks.

  • Go to admin if cache enable then you can disable cache after check working ya not working ? – user68116 Jun 12 '18 at 6:43
  • Thanks @PrashantPatel i was tried all basic configuration settings & run all related command. – Chirag Patel Jun 12 '18 at 6:54
  • The problem can be due to some JS error. Please check the browser's console for the errors and resolve accordingly to fix the issue. – Mohit Kumar Arora Jun 12 '18 at 7:03
  • 1
    This need to be REOPEN because it is occurring in Default Magento Theme. – Aditya Shah Jun 14 '18 at 6:06
  • 1
    maybe this helps magento.stackexchange.com/a/100128/146 – Marius Jun 19 '18 at 10:52
1

This is an old M2 issue Varnish top navigation menu gone

Even then all roads lead to github where there are similar reports like https://github.com/magento/magento2/issues/3897 but the vanishing menu has been plaguing users forever in M2.

1

To resolve this problem, you can override the default.xml file and remove it inside the ttl tag of the topmenu block, this xml find in Vendor/Magento/module-theme/view/frontend/layout.

  • Can you please explain to me why TTL tag added in default.xml and what is the use of TTL tag and what happens if we remove TTL tag? – Chirag Patel Jun 6 at 13:09
  • It serves to say if the block should be cached, then removing that tag from the topmenu block it will not be cached and will work again, I will see other better solutions, but this was the first one I found, to solve the problem – Alefe Mafra Jun 6 at 23:56

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.