• Hi there,

    First of all, thank you for this wonderful plugin. It’s exactly what I need. Unfortunately though, I’m seeing some inconsistency with the functionality of the actual accordion within the page.

    Typically the page will load the accordion properly, but after refreshing it will often stop working altogether and just display all of the content expanded. After inspecting the code, I’ve identified that the scripts for the plugin aren’t being injected into the footer of the site every time for some reason. Please refresh the page a few times to see what I’m talking about: https://www.staging2.airiswellsite.com/test-accordion/

    I assume this is a javascript conflict, but I can’t tell because there are no errors in the console. I’ve attempted disabling all other plugins as well, but no effect. Any help would be greatly appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author philbuchanan

    (@philbuchanan)

    It doesn’t appear to be loading the JavaScript file at all for me. The file isn’t anywhere in your code. Can you confirm that <?php wp_footer(); ?> is in the footer.php file and that file is being loaded on that theme pages template?

    Thread Starter drewhagni

    (@drewhagni)

    Hi Phil,

    Thanks so much for your quick response. I cannot confirm that <?php wp_footer(); ?> is included in my footer.php file because I’m using Genesis and they structure everything a little differently.

    That said, I’ve replicated the site so I can strip it out and enable some heavy debugging measures and I’m still seeing the same inconsistency. This site has plugins disabled and the default twenty sixteen theme enabled: https://www.staging3.airiswellsite.com/test-accordion/

    With this site, I can confirm that <?php wp_footer(); ?> is included in my footer.php file and it’s being loaded on every page. Any ideas?

    Plugin Author philbuchanan

    (@philbuchanan)

    It seems to be not outputting the Javascript file in the HTML at all. I honestly have no idea why that would be happening. I’ve never seen anything like this before.

    Thread Starter drewhagni

    (@drewhagni)

    Hmm… well is there a way that I can keep the scripts from being injected into the page automatically?

    I know you’re not seeing them load on your end, but they’ll load them every 3rd or 4th time for me. If I can prevent this from happening though, I can set up the page to load the scripts manually and prevent a double-event.

    Some additional information about this issue, by the way…
    I’m feeding in these accordion elements via Toolset Views, one of WordPress’ commercial plugins. I’ve opened a ticket with them as well, but they seem to be just as dumbfounded as us.

    I just can’t fathom what would prevent scripts from being loaded in the footer on a random basis, especially if other plugins are disabled and I’m running the default twenty sixteen theme… :/

    Plugin Author philbuchanan

    (@philbuchanan)

    Neither can I which is why I’m so confused. I can say that this plugin will only load the JS when it detects that there accordions on the page. So if the page doesn’t include an accordion, it won’t load. maybe there is some issue with Toolset Views that is causing the plugin to think that there are no accordions on this particular page, sporadically.

    Sorry I couldn’t be more help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Scripts are not loading every time’ is closed to new replies.