Sub menu not working

I am customizing my first site after purchasing. For some reason the sub-menus are not showing up on the main menu. This is a theme issue because I changed themes to the default WP theme and sub menus are working fine.

I have searched the forms but have not found a solution. Can you please tell me why this is happening? I have a main menu item and then for sub menus.

Thanks
Darryl

It appears that the issue is with woocommerce. When woocommerce is active the sub menus do not work. Is there an issue with BB theme and Woocommerce I am not aware of?

Thanks

Hey Darryl,

Interesting and I am assuming you are using our theme? Would you mind sending along temp admin access so I can take a look? Go ahead and tick the private reply option below when doing so.

Best,
Billy

[Content Hidden]

That is very strange, Darryl. I can’t seem to pinpoint why that would happen. I also did some local testing, recent version of everything and don’t seem to have that issue so I am thinking it has something to do with your custom install. Can you tell me more about that? Any specifics you can provide would be great.

Best,
Billy

[Content Hidden]

[Content Hidden]

[Content Hidden]

Hey Darryl,

I just checked your site and it seems a file from WooCommerce is having problems loading(error 406). I’ll post in a separate private reply a screenshot of it. It’s the first time I’ve seen that error code and a quick search on Google indicates this maybe a problem caused by a Mod_Sec rule being triggered. That is implemented by your hosting so I’d suggest getting in touch with them. Let us know how it goes!

Ben

[Content Hidden]

I will look into this. My question - Why does this only happen when using your BB theme? I can use any other theme along with BB builder plugin and woo commerce and everything works great. It would seem that there is some bad code in BB theme that is causing this error.

Hey Darryl,

That’s because our theme uses JS to show the submenu. Since the site is experiencing JS errors, all other elements relying on JS won’t work.

Ben

ok, I understand… I was able to correct it…

Thanks so much for your help.

Great theme and builder by the way.

Darryl

Hey Darryl,

That’s awesome! And thanks for the kind words! :slight_smile: Do you mind sharing what it was that caused the error?

Ben

Ben,

I did a search based on what you told me and found out that my mod-security rule is out dated. I am having my server admin correcting it. In the meantime I found the following fix and it worked perfect.

Thanks
Darryl


change the following files:

wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery.cookie.js
wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery.cookie.min.js

to:

wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery_cookie.js
wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery_cookie.min.js

(basically, you are taking out the first dot . in the file name and adding a _)

And add the following to your theme’s functions.php file: (child theme)

add_action( ‘wp_enqueue_scripts’, ‘custom_frontend_scripts’ );function custom_frontend_scripts() {global $post, $woocommerce;

$suffix = defined( ‘SCRIPT_DEBUG’ ) && SCRIPT_DEBUG ? : ‘.min’;
wp_deregister_script( ‘jquery-cookie’ );
wp_register_script( ‘jquery-cookie’, $woocommerce->plugin_url() . ‘/assets/js/jquery-cookie/jquery_cookie’ . $suffix . ‘.js’, array( ‘jquery’ ), ‘1.3.1’, true );

}

This only works when BB theme and woocommerce are both active. If you deactivate WC then you will get an error. You will need to remove the above code from the functions.php file.

Hey Darryl,

Thanks, we really appreciate it! Hopefully, it gets corrected soon.

Enjoy BB! :slight_smile:

Ben