Can't empty List form field in plugin

I have built many plugins but today I discover an issue which affects all of my plugins.

If in plugin’s configuration form has a List field, I can not empty the list. I can add new item, I can edit item’s values, but if I delete all items and save the plugin, the items are still there, they are not removed. At the present time the only solution is modifying the configuration file manually.

Here is an example of my plugin’s blueprints (I remove label and help attributes):

name: MyPlugin
version: 1.0.0
description: Custom plugin
icon: plug
license: MIT

form:
  validation: strict
  fields:
    custom_list:
      type: list
      style: vertical
      fields:
        .something:
          type: textarea 
          rows: 10
        .anotherthing:
          type: textarea
          rows: 5

I am not sure this is my fault or this is a bug. I appreciate any help! Thanks!

It’s a bug, already reported in https://github.com/getgrav/grav/issues/1285. QUick fix: add array: true to the field properties.

I already saw that bug report and added “array: true” but the problem still occurs.

My plugin’s default configuration only has the line “enabled: true” because the list is optional, so it doesn’t have any default values. I also tried to add an empty value to the default configuration file, like "custom_list: ", but it didn’t make any difference. I guess my problem is different to that bug report.