grav icon indicating copy to clipboard operation
grav copied to clipboard

Selecting multiple file blueprint bug

Open dani-ooo opened this issue 7 years ago • 5 comments

i'm trying to create a blueprint that allows selecting multiple: true images, but gives me an error when saving.

the code:

header.multiplefiles:
  label: Images
  type: filepicker
  folder: 'self@'
  preview_images: true
  accept:
    - .jpg
    - .jpeg
    - .png
    - .gif
    - .svg
  multiple: true

as pagemediaselect:

header.multiplefiles:
  type: pagemediaselect
  multiple: true

doesn't save and gives this error:

Whoops \ Exception \ ErrorException (E_NOTICE) Array to string conversion

i tried validating with validation.type: commalist and validation.type: array, but still no luck. it saves but gives this error:

Twig_Error_Runtime An exception has been thrown during the rendering of a template ("Array to string conversion").

am i missing something?

dani-ooo avatar May 17 '18 23:05 dani-ooo

actually read your issue wrong.

That filepicker field doesn't currently support multiple.

rhukster avatar May 19 '18 18:05 rhukster

I have the same issue! pagemediaselect is not functional at all for me!

header.gallery:
  type: pagemediaselect
  label: "Bildergalerie"
  multiple: true
  preview_images: true
  validate:
    type: array

Gives error: Array to string conversion

Related unanswered questions: https://discourse.getgrav.org/t/pagemediaselect-error-when-saving/3621 https://discourse.getgrav.org/t/filepicker-pagemediaselect-returns-empty/8493/2

Edit: Please file this as a bug, not and enhancement or question

NicoHood avatar Aug 19 '20 08:08 NicoHood

Is there any updates on selecting multiple images?

NicoHood avatar Nov 19 '20 14:11 NicoHood

I have tried a list with a single file picker field in it? That should work

rhukster avatar Nov 19 '20 19:11 rhukster

Any update on selecting multiple images? I mean there is still no solution, isn't it? Or is Grav already dead? Is it maintained?

binarykiwi avatar Dec 05 '24 09:12 binarykiwi