getgrav / grav-plugin-admin

Grav Admin Plugin
http://getgrav.org
MIT License
355 stars 227 forks source link

filepicker in elements IN a list does not work #2283

Open HiddenType opened 2 years ago

HiddenType commented 2 years ago

While nesting a filepicker (or pagemediaselect) in elements OR list is possible, nesting them in elements IN a list is not. A warning message «Not found» appears in the top right corner. (Tested in Grav v1.7.33 w/ Admin v1.10.33.1)

form:
  fields:
    tabs:
      fields:
        content:
          fields:
            content:
              unset@: true
            header.list:
              type: list
              label: List
              style: vertical
              fields:
                .name:
                  type: text
                  label: Name
                .pagemedia:
                  type: pagemediaselect
                  label: Pagemediaselect in List
                  preview_images: true
                .file:
                  type: filepicker
                  folder: 'page://images/'
                  label: Filepicker in List
                  preview_images: true
                  accept:
                    - .jpg
                    - .png
                .type:
                  type: elements
                  label: 'Type'
                  size: small
                  default: text_only
                  options:
                    text_only: Text only
                    text_and_image: Text and image
                  fields:
                    text_only:
                      type: element
                      fields:
                        .text:
                          type: text
                          label: Text (One)
                    text_and_image:
                      type: element
                      fields:
                        .text:
                          type: text
                          label: Text (Two)
                        .file:
                          type: filepicker
                          folder: 'page://images/'
                          label: Filepicker in List in Elements
                          preview_images: true
                          accept:
                            - .jpg
                            - .png
                        .pagemedia:
                          type: pagemediaselect
                          label: Pagemediaselect in List in Elements
                          preview_images: true
Currey commented 1 day ago

I've hit this wall just now. I'm attempting to build a similar blueprint with a List > Elements > Element > Filepicker. The error also occurs without the list and just a filepicker field in an elements field.

I'm going to assume if this issue is still open 2.5 years later that there is not a working solution to this setup?