Cookiebot is blocking the burger menu

Comments

4 comments

  • Hi Toby,

    Could you please tell me something more about the menu that you are using. Are you using a module/plugin or pure javascript for the creating of the menu? Do you know if the menu is setting some cookies on the website? I am asking this questions because some of above mentioned things could cause the problem. 

    A reason for the above described problem could be that the Cookiebot script is not the first one added to the site. You should add the Cookiebot script at the very top within the HEAD-tag of your website. Another solution which might also works is to move/include the other scripts to the footer so they do not conflict with Cookiebot script which should be added into the head tag of your website.

    Could you please also tell me if the burger menu is working if Cookiebot is set to manual blocking mode or it is disabled on the website? Any additional information would be useful. 

    Regards, 
    Spas

    0
    Comment actions Permalink
  • Avatar
    Toby Kalt

    Thanks for your fast reply.

    The menu is the default theme menu.

    CB is blocking it regardless if you accept cookies or not. I don't think that the menu is using a cookie. The menu should be just javascript. (but I'm not fully into that).

     

    I have the cookiebot plugin installed and after it didn't work propperly I added the code also into my header.php (see end)

    The burger menu is working if set to manual but then it doen't block the cookies. What do you mean with disabled on the website? In the wordpress plugin I can swich between auto and manual mode.

     

    Kind regards

    Toby

     

    <?php
    /**
    * The header for our theme.
    *
    * Displays all of the <head> section and everything up till <div id="content">
    *
    * @package storefront
    */

    ?><!doctype html>
    <html <?php language_attributes(); ?>>
    <head>
    <script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-cbid="c681*********effe8" data-blockingmode="auto" type="text/javascript"></script>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2.0">
    <link rel="profile" href="http://gmpg.org/xfn/11">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">

    <?php wp_head(); ?>
    </head>
    <body <?php body_class(); ?>>

    <?php do_action( 'storefront_before_site' ); ?>

    <div id="page" class="hfeed site">
    <?php do_action( 'storefront_before_header' ); ?>

    <header id="masthead" class="site-header" role="banner" style="<?php storefront_header_styles(); ?>">

    <?php
    /**
    * Functions hooked into storefront_header action
    *
    * @hooked storefront_header_container - 0
    * @hooked storefront_skip_links - 5
    * @hooked storefront_social_icons - 10
    * @hooked storefront_site_branding - 20
    * @hooked storefront_secondary_navigation - 30
    * @hooked storefront_product_search - 40
    * @hooked storefront_header_container_close - 41
    * @hooked storefront_primary_navigation_wrapper - 42
    * @hooked storefront_primary_navigation - 50
    * @hooked storefront_header_cart - 60
    * @hooked storefront_primary_navigation_wrapper_close - 68
    */
    do_action( 'storefront_header' );
    ?>

    </header><!-- #masthead -->
    <?php
    /**
    * Functions hooked in to storefront_before_content
    *
    * @hooked storefront_header_widget_region - 10
    * @hooked woocommerce_breadcrumb - 10
    */
    do_action( 'storefront_before_content' );
    ?>

    <div id="content" class="site-content" tabindex="-1">
    <div class="col-full">

    <?php
    do_action( 'storefront_content_top' );

    0
    Comment actions Permalink
  • Avatar
    Toby Kalt

    I got around the bug by installing another menu plugin.

    0
    Comment actions Permalink
  • Hi Toby,

    In case that the default theme burger menu is working if Cookiebot blocking mode is set to manual then most likely the theme or the menu (menu script) is setting some cookie about the menu. But I could not say more without seeing the website. 
    However, I am glad that you have found a work around and everything is working fine now. Please do not hesitate to write back if you have any other issues. 

    Regards, 
    Spas

    0
    Comment actions Permalink

Please sign in to leave a comment.