In Magento 2.2.4 Community Or Enterprise edition default menu does not appear on the home page
I was checked and found that JS is not showing in inspect element on the home page, so the reason for this menu is not displaying.
in inspect element on the home page showing like this
<esi:include src="http://127.0.0.1/ab-ee/page_cache/block/esi/blocks/%5B%22catalog.topnav%22%5D/handles/WyJkZWZhdWx0IiwiY21zX2luZGV4X2luZGV4IiwiY21zX3BhZ2VfdmlldyJd/"></esi:include>
Here Actually, the problem is related to Varnish Cache if I disable Varnish Cache from Store -> Configuration -> Advanced -> System -> Full page cache -> Caching Application Set to Varnish Cache then the menu is not displaying if I set it to 'Built-in cache' then it's working fine.
OR follow the below steps to get this done
Overwrite default.xml located at /vendor/magento/module-theme/view/frontend/layout/ search for ttl="3600" written inside " block and simple remove ttl="3600" It should work now
TTL serves to say if the block should be cached, then removing that tag from the top menu block it will not be cached and will work again
It is working
ReplyDeleteThanks