Menu navigation missing when Varnish is activated in magento 2.4.2 with php 7.4

Keywords: Magento - Other - Technical issue - Upgrade
Description:
We currently installed and activated Varnish on our new Magento 2.4.2 with php 7.4 solution. After the installation was successfully, we noticed that the Menu navigation is gone. when we disable varnish (use “build in cache” from admin) it works fine

Hi @pathakkrunal,

Thanks for your message. Unfortunately, your question seems to be more related to the Magento and Varnish integration than to the Bitnami installation, therefore we recommend you to open a new question in the Magento community forums, where people with more experience can help you to debug and fix your issue.

https://community.magento.com/

Regards,
Gonzalo

Noted with thanks,
But we have noted that varnish cache is also not working,
Please advice

Thank you

Hi @pathakkrunal,

Is Varnish not working on any URL or only with the specific menu entry you mentioned in your first post? We have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?

Please note that you need to paste the code ID that is shown at the end.

Hi @gongomgra,

when we test varnishlog or varnishstat command it shows below message,


Now we are not sure is it working or not.

Thank you

Hi @pathakkrunal,

I launched a fresh new machine and those Varnish commands worked for me, you just need to run them with sudo privileges

sudo varnishstat
sudo varnishlog

Here is a sample of the sudo varnishstat output

Hi,
here is the answer:

https://support.weltpixel.com/hc/en-us/articles/360000022773-Navigation-Mega-menu-missing-when-Varnish-Cache-is-activated-with-Magento-2

In some cases when Varnish Cache is activated, due to a Magento 2 and Varnish issue, the navigation menu can disappear.

In order to solve this Magento issue, you can remove the TTL attribute (remove ttl = “3600”) from /vendor/magento/module-theme/view/frontend/layout/default.xml, and the navigation menu will appear.

Regards

Eduard

Hi @pathakkrunal, @eduard,

Thanks for your help with this issue! @pathakkrunal let us know if it worked for you.

Hi @gongomgra,
I am sorry for late Reply.
I have tried bellow command but it gives me the same result.

sudo varnishstat
sudo varnishlog

Thank you.

Hello @eduard,

I have tried that and also tried cacheable=“false” but neither worked for me
Thank you.

Hi,
I no longer use Varnish for https, but in the past the above solution helped me. Try this solution:

https://support.magento.com/hc/en-us/articles/360028757791-Top-navigation-panel-does-not-load-on-storefront

and it is the result of this issue:
https://github.com/magento/magento2/issues/3897

Otherwise they do not recommend using your solution cacheable = “false”.

(Beware of using cacheable = “false” in XML layout. Any page that contains a block with cacheable = “false” will never be cached in the Full Page Cache.)

Regards
Eduard

Hi @pathakkrunal,

Can you run the bnsupport tool and share with us the code? Can you also try to start all services and check if they are running?

sudo /opt/bitnami/ctlscript.sh start
sudo /opt/bitnami/ctlscript.sh status

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.