Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form Export To CSV Issue #9220

Closed
emran-alhaddad opened this issue Dec 18, 2023 · 6 comments
Closed

Form Export To CSV Issue #9220

emran-alhaddad opened this issue Dec 18, 2023 · 6 comments

Comments

@emran-alhaddad
Copy link

emran-alhaddad commented Dec 18, 2023

Bug description

When I tried to export the form submissions to csv from statamic dashboard it gave me this issue "Array to string conversion"

image

How to reproduce

nothing, just click export btn

Logs

No response

Environment

https://flareapp.io/share/17WJMnjP this is the issue details

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

None

Additional details

No response

@ryanmitchell
Copy link
Contributor

Are you able to share an example of a submission that is causing the issue? It seems to me like there might be something thats multi-nested in your data.

@lokmanm
Copy link
Contributor

lokmanm commented Dec 18, 2023

@emran-alhaddad @ryanmitchell is correct. I had this happen once when using a Replicator field inside my form and then exporting it to CSV.

Do you have something like that?

@emran-alhaddad
Copy link
Author

Hello Bro @ryanmitchell

As @lokmanm said , the issue is caused by the filed set that have a replicator on it and included in the form , I used it in this way because the form has no replicator item, and the thing to figure it out is in this way

This is the scenario in basic words

@ryanmitchell
Copy link
Contributor

I think you would need to add your own custom exporter to handle this then. The default exporter isn’t designed to handle nested fields like that.

@duncanmcclean
Copy link
Member

By default, Statamic doesn't let you add Replicator fields to forms.

As suggested, you can workaround this by defining your own exporter. See #8837 for more details.

@duncanmcclean duncanmcclean closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2023
@emran-alhaddad
Copy link
Author

Thanks @ryanmitchell @duncanmcclean for your support

But another point I want you guys to make it in consideration that the same scenario works when exporting into json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants