• Resolved vitamincee

    (@vitamincee)


    Hello!
    I created a custom pattern using these accordion blocks within a group and it works great. Unfortunately if I try to add more than two sets they stop opening/closing and show as ac-undefined. Any idea how I can fix this? I even tried adding new accordions in case it was an id conflict but that didn’t work either.

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

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

    (@philbuchanan)

    This is peculiar. I’m not able to reproduce the issue. That said, there have been other bugs around the ID creation system in the past.

    Is there any more info you can share about how you’re using the accordions? Are you using the duplicate block feature? Copying and pasting? Manually adding new ones? I’d like to be able to get to the bottom of this and help fix it for you, but I’m currently stumped.

    Thread Starter vitamincee

    (@vitamincee)

    Thank you for the reply! I’ve made 2 Gutenberg patterns, both are a group block with about 8 accordions inside. The difference between the two are in the styling, one is a grey background in the group block with white accordions, and the other is white with grey accordions.

    To make the pattern, I added the group block, added the accordions inside, and copied the whole thing into the pattern. Then I can add it on any page easily like a block.

    That seems to work fine until I try to add a duplicate same color pattern or even just the simple accordion block underneath the two patterns.

    I hope that makes sense!

    Plugin Author philbuchanan

    (@philbuchanan)

    That does make sense. I’m still looking into the issue. I may have an idea of what the cause is, but it is going to take me a little bit of time to fix and release an update.

    As a temporary workaround (I think this should work), you can set custom uuids for each accordion in the code editor. If you click the vertical ellipses icon in the top right of the top toolbar, you’ll see the “Code editor” option. If you click that, you’ll see the underlying code for the page. From there, you’ll see each accordion item starts with a block that looks like this (you can do a find in your browser for <!-- wp:pb/accordion-item to find each individual accordion item):

    <!-- wp:pb/accordion-item {"uuid":70239} -->

    You can edit the uuid part for each accordion item to be a custom random number (e.g. 10001, then 10002 etc. Each one needs to be different). If you don’t see the uuid part, just add it. E.g. if you see this:

    <!-- wp:pb/accordion-item -->

    Change it to this:

    <!-- wp:pb/accordion-item {"uuid":10001} -->

    When you switch back to the “Visual editor” you will likely see an error message for every accordion block that you changed that says “This block contains unexpected or invalid content.” Don’t panic :). If you click the “Attempt Block Recovery” button, it should fix everything (including generating a new, unique uuid for the accordion item).

    Worst case, if everything is messed up, just reload the page without saving your changes and you’ll be back to the same broken state the page is in now.

    Plugin Author philbuchanan

    (@philbuchanan)

    Here is a link to a new development build of the plugin. Would you mind installing and seeing if it fixes your issue?

    Thread Starter vitamincee

    (@vitamincee)

    Horray that fixed it!! You’re amazing! Thank you so much!!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘undefined’ is closed to new replies.