kirby-markdown-field icon indicating copy to clipboard operation
kirby-markdown-field copied to clipboard

Cannot read properties of undefined (reading 'page')

Open morja opened this issue 1 year ago • 7 comments

Hi, I just installed the plugin and when I set a field to type:markdown I get the following error in the panel:

index.min.js:1 TypeError: Cannot read properties of undefined (reading 'page')
    at a.fetch (index.min.js:1:19115)
    at a.created (index.min.js:1:19053)
    at pn (vue.min.js:11:22030)
    at Ve (vue.min.js:11:19065)
    at e._init (vue.min.js:11:43036)
    at new a (vue.min.js:11:40307)
    at vue.min.js:11:33251
    at init (vue.min.js:11:33282)
    at vue.min.js:11:67727
    at d (vue.min.js:11:68004)

The line in index.min.js: page: this.pagination.page

I am using Kirby 4.0.2

morja avatar Dec 25 '23 10:12 morja

I also get an error when I try opening the page or file dialog:

index.min.js:1 TypeError: Cannot read properties of undefined (reading 'map')
    at a.items (index.min.js:1:18921)
    at t.get (vue.min.js:11:28022)
    at t.evaluate (vue.min.js:11:29018)
    at a.items (vue.min.js:11:31194)
    at a.<anonymous> (index.min.js:1:20278)
    at t._render (vue.min.js:11:45523)
    at a.r (vue.min.js:11:79429)
    at t.get (vue.min.js:11:28022)
    at t.run (vue.min.js:11:28755)
    at en (vue.min.js:11:19575)

The line in index.min.js:

return this.models.map(this.item)

morja avatar Dec 25 '23 10:12 morja

I'm getting the same error when adding type: markdown to a blueprint.

bigskillet avatar Feb 15 '24 16:02 bigskillet

Same error for me. Does anyone have any insight?

tomstreeter avatar Feb 26 '24 20:02 tomstreeter

@morja @bigskillet @tomstreeter I just tried to reproduce that issue, could you please share a few more details with me? Namely Kirby version, Plugin version (Kirby 4 installations only work with 3.0.0+) and your blueprints?

fabianmichael avatar Mar 01 '24 09:03 fabianmichael

@fabianmichael oh, thanks! I completely missed version 3.0.0! It looks good so far!

MathiasGmeiner avatar Mar 01 '24 10:03 MathiasGmeiner

Yeah, this was me missing that 3 exists. Updated to the current main and all is well.

tomstreeter avatar Mar 01 '24 19:03 tomstreeter

I also got confused because GitHub says latest is 2.x and composer doesn’t bring it up when running outdated. All good now using 3.x

LeBenLeBen avatar Mar 05 '24 06:03 LeBenLeBen