Bug with multiple upload fields

Hi guys! I am currently working on a portfolio site that includes quite a lot of file uploading through the admin plugin. I now came across a strange error. I am using a list to upload files along with some attributes. This is the code in my template YAML:

        header.entries:
          name: images
          type: list
          label: Bilder
          collapsed: 'true'

          fields:
            .images:
              type: file
              label: Images
              destination: 'self@'
              accept:
               - 'image/*'
              multiple: true
            .layout:
              type: select
              size: short
              label: Größe der Bilder
              options:
               full: 100%
               twothirds: 66%
               onethird: 33%
               doubleheight: 33% (doppelte Höhe)
            .slideshow:
              type: toggle
              options:
               1: PLUGIN_ADMIN.YES
               0: PLUGIN_ADMIN.NO
              default: 0
              label: "Mehrere Bilder als Slideshow zusammenfassen"
            .onfront:
              type: toggle
              options:
               1: PLUGIN_ADMIN.YES
               0: PLUGIN_ADMIN.NO
              default: 1
              label: "Bilder in der Übersicht anzeigen"
            .backgroundcolor:
                type: colorpicker
                label: Hintergrundfarbe
                placeholder: '#00000'
            .backgroundblur:
              type: toggle
              options:
               1: PLUGIN_ADMIN.YES
               0: PLUGIN_ADMIN.NO
              default: 0
              label: "Background Blur"
            .coverimage:
              type: toggle
              options:
               1: PLUGIN_ADMIN.YES
               0: PLUGIN_ADMIN.NO
              default: 0
              label: "In der Übersicht zuerst anzeigen"

My problem is, that whenever I have multiple image upload fields on the page, delete an image from one of them and save the page, all other images disappear and every image upload field is populated by the image in the first of my fields.

Before: https://ibb.co/kQ2SX7
After deleting an image from one field and saving: https://ibb.co/gpoO5S

Does anyone have an idea what might cause this bug?

Cheers
Pascal

1 Like

U’re not alone. I’ve noticed this behavior today either: https://github.com/getgrav/grav/issues/1950

I think yours is different. It is standard behaviour. As far as I understand the field “Page Media” is meant to list all media that is part of a page, no matter from which field it has been uploaded.

Where do you read that? I think its not right.