johannschopplich / kirby-punctuation-section

✒️ Insert punctuation marks into your text with a single click
https://kirbyseo.com
MIT License
33 stars 2 forks source link

Cannot read properties of undefined (reading 'map') #3

Closed hansgohr closed 1 year ago

hansgohr commented 1 year ago

Hi Johann,

first of all thank you for that plugin, I find it really helpful for a lot of projects :)

I was just testing it on a live server and got prompted with Cannot read properties of undefined (reading 'map'). The panel sections stays empty.

Plugin Version: 2.1.10 Kirby 3.9.2 (tested with 3.9.1 as well) Php 8.1.16 Apache (tested with 8.0.28 as well) Chrome 111.0.5563.64

The developer tools guide me to that function in the index.js

      async created() {
    const e = await this.load();
          this.label = e.label, this.theme = e.theme || "none", this.text = this.fieldsets.map(t => ({
              ...t,
              label: this.t(t.label),
              help: t.help ? this.t(t.help) : !1
          }))
      },

Do you have any clue how to fix that?

Thank you and cheers :slightly_smiling_face:

johannschopplich commented 1 year ago

Hi Hans, it seems your punctuation section is not set up properly. Can you please share it? I need a minimum reproducible example. Thanks!

hansgohr commented 1 year ago

Hi Johann,

sorry for getting back that late. Alright I feel a little stupid right now, my punctuation section blueprint was located in a folder called "section" not "sections" :see_no_evil: Everything is working perfectly now, thank you for your effort and happy holidays. :relaxed:

johannschopplich commented 1 year ago

Glad to see it resolved. Happy Easter! 🐰

hansgohr commented 1 year ago

I just recreated my mistake and this time I figured why. In the readme it says: Create a section/punctuation-helper.ymlin your blueprints folder… I just copy pasted this to my editor. Maybe you can rename it to sections/punctuation-helper.yml :)

Happy summer ☀️

johannschopplich commented 1 year ago

Hi @hansgohr, thanks for reaching out during the summer break. I have updated the README accordingly. Thanks, you too! 🙂