skip to Main Content

I am using Magento 2.3 with Redis. The problem was the navigation menu disappears when I enable full page cache. When I disable full page cache, the menu appears.

  • full page cache enabled: menu disappears
  • full page cache disabled: menu appears

app/etc/env.php

 'cache' => [
        'frontend' => [
            'default' => [
                'backend' => 'Cm_Cache_Backend_Redis',
                'backend_options' => [
                    'server' => '127.0.0.1',
                    'database' => '0',
                    'port' => '6379',
                    'password' => 'xxxx'
                ]
            ],
            'page_cache' => [
                'backend' => 'Cm_Cache_Backend_Redis',
                'backend_options' => [
                    'server' => '127.0.0.1',
                    'database' => '0',
                    'compress_data' => '0',
                    'password' => 'xxxx'
                ]
            ]
        ]
    ],
    'session' => [
            'save' => 'redis',
            'redis' => [
                'host' => '127.0.0.1',
                'database' => '0',
                'port' => '6379',
                'password' => 'xxxx',
            ]
    ],

How can I fix this if I want enable full page caché ?

2

Answers


  1. Chosen as BEST ANSWER

    Solution

    Go to Stores > Configuration > Advanced > System > Full page cache > Cache application > Choose "Built-in Cache"

    Reason

    The menu doesn't appear if

    • you enable "Varnish Cache (Recommended)" instead of "Built-in Cache"
    • you don't have Varnish
    • and "full page cache" is enabled

  2. I removed the TTL attribute from /vendor/magento/module-theme/view/frontend/layout/default.xml and the menu bar was visible again. Hope it helps someone!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search