• Resolved jtuerk

    (@jtuerk)


    The accordion blocks are not opening or closing most of the time and I’m getting an error message in the console: `Uncaught TypeError: Cannot read property ‘replace’ of undefined
    at i (accordion-blocks.min.js?ver=1.3.5:1)
    at HTMLDivElement.<anonymous> (accordion-blocks.min.js?ver=1.3.5:1)
    at Function.each (jquery.min.js?ver=3.6.0:2)
    at s.fn.init.u.fn.accordionBlockItem (accordion-blocks.min.js?ver=1.3.5:1)
    at HTMLDivElement.<anonymous> (accordion-blocks.min.js?ver=1.3.5:1)
    at Function.each (jquery.min.js?ver=3.6.0:2)
    at s.fn.init.each (jquery.min.js?ver=3.6.0:2)
    at accordion-blocks.min.js?ver=1.3.5:1
    at dispatch (jquery.min.js?ver=3.6.0:2)
    at v.handle (jquery.min.js?ver=3.6.0:2)`

    The page I need help with: [log in to see the link]

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

    (@philbuchanan)

    It looks like something is wrapping each of your accordion item titles in a <strong> element. This is breaking the selector: children(".js-accordion-controller"), since technically .js-accordion-controller is not a child any more.

    In fact, there seems to be a large number of <strong> elements scattered throughout the content HTML. They are often nested several layers deep, which I’m assuming is not intentional. My guess is your theme or another plugin is filtering the post content and adding in the <strong> elements. Can you try disabling all other plugins, switching to the default theme (Twenty Twenty One), and creating a new page with the accordions on it? You may need to contact the theme developer.

    Thread Starter jtuerk

    (@jtuerk)

    Thanks so much for your help. We had some conditional shortcodes in there, and the tags were in the wrong place so that only the opening or closing tag was being output up in some places. I went through and fixed that, and now everything is working.

    • This reply was modified 3 years, 6 months ago by jtuerk.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Accordion blocks not working’ is closed to new replies.