• Resolved jrt341

    (@jrt341)


    I recently noticed that the navigation on my website was no longer working correctly. Upon investigation I found that this plugin was the culprit. When deactivating it, everything works as expected.

    I went back to previous versions of the plugin to find out when things broke and it looks like when it went from 5.5.2 to 6.0 is when the plugin broke part of my theme.

    I have a navigation.js file that my theme uses and is no longer working when your plugin is active. I can’t leave the live site up with your plugin on to look at but I do have a staging site that you could look at https://bcclark2.flywheelstaging.com. I’ve enabled your plugin there and it has the problem.

    If you click on the menu in the top left it opens up the menu navigation and then if you try to click on any menu item that has an arrow next to it to access it’s sub items they won’t open. You can see the regular behavior on the live site at https://bcclark.com.

    I’d love to continue using your plugin, but I can’t figure out where they conflict is happening or how to stop it. Any help would be appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Hi @jrt341,

    On the staging, I see the error occurs in the script ‘import.js’. But I don’t see ‘import.js’ in your live site.

    micro.dy.cloud.bosslogics.com/js/import.js

    What does this import.js file do? Is there a reason it’s not active on the live site?

    Thread Starter jrt341

    (@jrt341)

    That script only exists on specific pages of my site, and only works on the live site to bring in a third party jeweler’s content. I you would please go back to the home page of the website I provided and work from that.

    I didn’t see any console errors that were pointing me in the right direction when I tried troubleshooting things myself.

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Strange, the import.js error happened on each click in the menu. A coincidence
    I guess. I currently also don’t see any javascript errors, so can’t say what the problem is. It might be an event listener.

    I’ve seen some issues where an event in a theme conflicted with our new javascript library. This was quickly fixed by the theme developer, it might be a similar issue: https://wordpress.org/support/topic/mobile-menu-no-longer-clickable-after-update/

    Who is the theme developer? Then I can contact them to see if we can resolve the conflict.

    Thread Starter jrt341

    (@jrt341)

    I’m the theme developer.

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Ah 🙂

    Can you send me a copy of the theme so I can debug this on localhost? you can send it to support(at)complianz.io

    Thread Starter jrt341

    (@jrt341)

    Email has been sent.

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Hi @jrt341,

    Thanks for sending over the theme. I’ve found the problem. In the cmplz_fire_categories_event() function, this variable:

    event = new CustomEvent('cmplz_fire_categories', { detail: details });

    has to be declared as a new variable:
    let event = new CustomEvent('cmplz_fire_categories', { detail: details });

    I suspect that in your code, you also use a variable ‘event’. When I don’t declare it as local variable, the global one gets overwritten.

    I’ve pushed the solution to the master in github:
    https://github.com/Really-Simple-Plugins/complianz-gdpr/compare?expand=1

    This works for me locally, would be great if you can confirm this works for your configuration as well.

    Thread Starter jrt341

    (@jrt341)

    I pulled the update from GitHub and can confirm that this works on my site with the theme I sent you. Thanks for looking into this for me.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Update from version 5 to 6 breaks my theme navigation’ is closed to new replies.