Since I’m hoping to customise the way structures are displayed in the panel, I started experimenting with custom form fields. I copied the structure field folder from panel/app/fields
in to the site/fields
folder to overwrite the native structure field as per the Getting Started guidance. Made my tweaks and was happy with the way they looked, all was well.
Shortly after, I realised that it was taking unusually long to save changes in the panel on pages using the structure field. The thin white progress bar along the top of the screen progresses really slowly (maybe 60 seconds?) and then stops just before it finishes so you never receive the visual confirmation that the content has saved. That said, when I reload the page the changes seem to be saved.
To reduce inconsistencies I retraced my steps, copying the native structure field files in to sites/fields
and this time leaving them untouched. Tested saving again and had the same results as above.
I checked Chrome’s inspector and found these notices and warnings when the save button is clicked (site-dir
being my site directory):
Notice: Undefined property: Collection::$data in /site-dir/kirby/toolkit/lib/collection.php on line 482
Warning: array_change_key_case() expects parameter 1 to be array, null given in /site-dir/kirby/toolkit/lib/collection.php on line 482
Notice: Indirect modification of overloaded property Collection::$data has no effect in /site-dir/kirby/toolkit/lib/i.php on line 47
Those three lines above appear over and over, figure I wouldn’t repeat them so much above though!
Has anyone else out there on the forum run in to a problem like this, or do you maybe have a hunch as to what might be going wrong? I’d be very happy to raise an issue for this on GitHub but wanted to see what forum folks thought first since I am new-ish to Kirby, it’s certainly possible I’ve missed something!