"Invalid argument supplied for foreach()" on Kirby Panel when using "type: structure" in blueprint file

Hello everyone, I’ve been trying to figure out this issue, on the Kirby Panel an error will occur when I use Structure as a field type. the error is “Invalid argument supplied for foreach()”.

The error in the Backpanel
Capture

How i’ve set-up my .yml file
Capture2

I’ve not called anything in the template, and I’ve tried disabling all my plugins :frowning:
This also seems to have broken the saving and tags on my back panel page.
This error also happens when pasting the Kirby docs template file.

1 Like

This is fixed in the develop branch of the Kirby panel, hopefully it gets merged with live soon.

2 Likes

For people looking for a temporary fix, try the solution described here: https://github.com/getkirby/panel/issues/1080

1 Like

Please try if this fix works for you, i.e. if it actually adds the default values if you create a new page. In my tests, it didn’t work.