Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WordPress and Gravity Forms conflict [Mobile Only] #96

Open
MAC-miles-tech opened this issue May 30, 2023 · 2 comments
Open

WordPress and Gravity Forms conflict [Mobile Only] #96

MAC-miles-tech opened this issue May 30, 2023 · 2 comments

Comments

@MAC-miles-tech
Copy link

Hello,

I have used this script on a WordPress website, and everything seemed to work great on the development environment. We tested extensively, but when we launched, we ran into an odd error. Actually, its the lack of error that is odd. The menu will not open on mobile only on the pages listed below. All caching has been turned off on the website. When I use browserstack, I dont see an error. When I use the inspect tool, I also see no errors. I have reached out to Gravity Forms and they said to reach out to you (typical). I have run npm update recently, which would give me an updated version of the code. I am not sure what other steps to take.

Sporadically, I find this error or something similar.
https://share.gravityfor.ms/i/ReewAd

The website is: https://www.amo-union.org/
Example page where menu is not working:
https://www.amo-union.org/contact-dispatching/
https://www.amo-union.org/membership-application/

@tametheone
Copy link

Hi,
can You provide some code?

@MAC-miles-tech
Copy link
Author

Here is the snippet I use to activate the hc-offcanvas-menu:

`jQuery(document).ready(function($) {

$('#main-nav').hcOffcanvasNav({
    disableAt: 992,
    customToggle: $('.toggle'),
    levelSpacing: 40,
    navTitle: $('<img src="/wp-content/themes/AMO-union/images/amo-logo.svg" alt="American Maritime Officers" width="125" height="125">'),
    levelTitles: true,
    levelTitleAsBack: true,
    pushContent: '#page-container',
    position: 'right',
    insertClose: false,
    levelSpacing: 0,
});

});`

Other than that I use a custom WordPress menu walker to spit out the code as you see it on the front-end. Since submitting this ticket, it seems that there is some different behavior. The sporadic error I mentioned above has become persistent with every load. I am seeing the mobile nav toggle bars on all screen sizes on the pages linked above as well.

image

The code between pages with errors and without errors seem to be slightly different as well. Notice the mobile menu toggle has a bunch of classes and attributes on about us, but not on contact dispatching. I think the error is preventing the code from behaving as expected. Do you know where this error is originating?

/contact-dispatching
image

/about-us
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants