Skip to content

Conversation

@Lampone
Copy link
Contributor

@Lampone Lampone commented Jun 5, 2025

If the id from the model is not passed back to the FileEntry, it will always create a new submission on save

Closes #439

@Lampone
Copy link
Contributor Author

Lampone commented Jun 5, 2025

#439 potential fix

@ryanmitchell
Copy link
Contributor

I modified this a little - let me know if it still works for you.

@Lampone
Copy link
Contributor Author

Lampone commented Jun 5, 2025

Your code change seems to work, but i don't really understand why you would only set the id on save and not always?

@ryanmitchell
Copy link
Contributor

We only need to set it on first save - after that it gets set by fromModel()

@Lampone
Copy link
Contributor Author

Lampone commented Jun 5, 2025

Thanks for the explanation. It works for me.

@ryanmitchell ryanmitchell merged commit d7bfc91 into statamic:4.x Jun 5, 2025
19 checks passed
@ryanmitchell
Copy link
Contributor

Thanks for the PR - appreciate you taking the time to submit it.

faltjo pushed a commit to faltjo/eloquent-driver that referenced this pull request Jun 30, 2025
* Fix submission is newly created on save

* Do it on save

---------

Co-authored-by: Ryan Mitchell <ryan@thoughtcollective.com>
duncanmcclean pushed a commit that referenced this pull request Jul 4, 2025
* Fix submission is newly created on save

* Do it on save

---------

Co-authored-by: Ryan Mitchell <ryan@thoughtcollective.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Form submission duplidate error in SubmissionCreated event

2 participants