verbb / formie

The most user-friendly forms plugin for Craft CMS.
Other
93 stars 69 forks source link

[GraphQL] Only the first asset field inside a repeater field gets saved #1832

Closed hw-01010 closed 2 months ago

hw-01010 commented 2 months ago

Describe the bug

I currently have a problem, saving assets inside a repeater field via GraphQL mutation. The first file is saved normally, but the other files don't save.

image

I use the following GraphQL Mutation:

mutation MyMutation($repeaterField: testststststst_asdfasdf_FormieRepeaterInput) {
  save_testststststst_Submission(asdfasdf: $repeaterField) {
    id
  }
}

Query Variable:

{
  "repeaterField": {
    "rows": [
      {
        "asdfasdf": [
          {
            "fileData": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNgYAAAAAMAASsJTYQAAAAASUVORK5CYII="
          }
        ]
      },
      {
        "asdfasdf": [
          {
            "fileData": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNgYAAAAAMAASsJTYQAAAAASUVORK5CYII="
          }
        ]
      }
    ]
  }
}

I have already tried to use different Filenames, different files, creating a new From, nothing worked, so I think this is a Bug.

Steps to reproduce

  1. Create a From with a repeater field and a File Upload field
  2. Execute provided GraphQL Mutation
  3. Check Form Submisson

Form settings

Craft CMS version

4.8.9

Plugin version

2.1.11

Multi-site?

yes

Additional context

No response

engram-design commented 2 months ago

Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-4 as 2.1.11".

engram-design commented 2 months ago

Fixed in 2.1.12