Menu issues - new

Hi there, I just rolled out our new look site:

I just replaced the code on my home page, and havnt changed the menus, but, they have stopped working how they should.

I have a one page scroll setup for the homepage, rest are normal pages, so I have 2 menus setup. Yet the homepage the nav bar underscore stays colored as you scroll down, for each item.

Also, I have this js:

!function(n){n(".x-one-page-navigation-active .x-navbar .mobile .x-nav > .menu-item:not(.menu-item-has-children)").on("click touchend",function(){n(".x-btn-navbar").trigger("click")})}(jQuery);
jQuery('document').ready(function($) {
    $('a.envira-gallery-link, a.envira-gallery-link img').removeAttr('title');
});

To make the menu on a mobile behave well, it makes it disappear when you click on menu items, so the mobile menu doesnt cover the page, it works for prices, if you click you will what I mean, but on “why us” it doesnt work.

I include login details in the secure note.

Thanks in advance for your awesome support.

Hello @logoglo,

Thanks for writing in!

The “Home” menu item in your One Page menu should be a page and not a custom link. I went ahead and already made the changes for your one page menu. It just that the changes did not take place because you are using CloudFlare. Please login to your CloudFlare account and purge your site cache and test your site again.

Please let us know how it goes.

Thanks, but the error is still seams to be happening, check the mobile menu too, when you click why us, the menu stays, it should act like when you click prices.

I have turned off full caching in cloudflare, and you can clear wp-rocket, kinsa cache, and cloudflares all in the wp dashboard :slight_smile:

Thanks!

Hello @logoglo,

There is a JS error on the page.

Can you please temporarily deactivate all your caching plugin and turn on Development Mode in CloudFlare while we are troubleshooting?

Please let us know how it goes.

done, you can disable wp rocket while you are in wordpress.

However, I had all this applied before the new site and the menu worked :slight_smile:

thanks.

Hi @logoglo,

I did check the website. First of all, I found the Javascript error caused by Contact Form 7. The Captcha related code throws an error; it might be a conflict with another plugin or a bad setting. But the problem was not caused by that error.

I am not sure why the one page is acting that way, I would like to know exactly what you have changed that caused this error? As you mentioned, it was working before.

This will take ages to find out why the problem is happening, and the best way to go forward is to duplicate the page using the Post Duplicate plugin and try to remove sections and test them one by one to find the culprit. Usually, it is a matter of wrong HTML tag or missing closing one or that sort of thing.

As you used the Visual Composer for the page design, please consider the points below as the best practices:

Always keep the ID that you want to refer in the one-page navigation as the top-level section. So you need to use the Content Bands. If you check the front end of the website with the Google Developer Toolbar you will see each Content Band starts with an ID:

This will reduce the error-prone conditions, and you will avoid possible problems. Anyway, the best way to go about this is to double-check each and every section to find the culprit with the method I mentioned. I do think if you can find the problematic section and fix it, the Mobile Menu problem will be fixed too.

Thank you.

The error with captchya is because of a script loading plugin, I use it to stop captchya loading on every page for contact form, and contact form scripts form loading etc, this plugin has been in use for ages, and with the old page, and the old pages menu worked.

All settings, including caches, minifying etc, are the same as the old page, even the placing of the page id’s, the old page worked.

I disabled all the plugins too, and the error still occurs. I took out all my custom css and java, and it still errors.

As per using id’s in content bands, you cant, there is no option to ad an id in the content band, only in the column.

Why does the prices work on the mobile but why us no?

Sorry, you guys are usually awesome, but this answer doesnt really help.

Can you please look into this further.

I have moved around the menu items, and have taken the scroll to items, and put them in the main nav, not as dropdowns, this has fixed the mobile menu issue, but the other remains.

Hello @logoglo,

I created a one page test menu and I have applied it to your New Home page (Check the secure note for the url).
The menu displays yet there is still a JS error. I have deactivated WP Rocket. It seems that Cloudflare is serving a minified JS/CSS files. Can we turn ON development mode in CloudFlare and please make sure that minification is turn off too so that we can check the test page again.

Please let us know how it goes.

I have enabled dev mode in cloudflare.

Hey @logoglo,

Would you mind temporarily completely disconnecting Cloudflare from your site so we could rule out the optimization factor? The error is still pointing to Cloudflare’s rocket loader.

Thanks.

Its in dev mode…so it should be bypassing cloudflare all together. I have disable rocketloader.

Hi @logoglo,

I did some test on the page but no dice, there are a couple of tests that I want you to do since there is no caching involved now, please do testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

And if that did not work, please try switching to parent X theme, the issue could be on your child theme’s customization.

Thanks,

Just tried both, but no luck :frowning: this is a mystery

Hi @logoglo,

Then that means the issue is on your content, here’s a simple page here with your one page menu, its works perfectly fine.

Please do the following, save your page as a template (serve as a backup), then delete your content one by one from the top, test the one page menu every time you delete content if the one-page menu works then the last content deleted is causing the issue (its like a plugin test except its for content)

Let us know how it goes,
Cheers!

Done, this is totally weird, so, I paste the content onto a new page, and the menu works as it should.

So on the actual homepage, I deleted all the content, and the error is still there.

So I thought, the wp-rocket, perfmatters and plugin loader are the only plugins that effect scripts etc, so I disactivated them, error is still there…

Hi @logoglo,

Try to Purge everything from your Cloudflare dashboard account

Purging cached resources from Cloudflare

Thanks,

Each time I do anything, any changes, I purge all caches.

Hello @logoglo,

Can you please provide the access to your CloudFlare so that we can check your setting and we can enable the development mode while we are troubleshooting your site?

Please provide it in a secure note when you reply.

Thanks.

Please hold off on this for a couple of days, Im going to re-do the whole menu, see if that fixes it.