Skip to content

Form submission duplidate error in SubmissionCreated event #439

@Lampone

Description

@Lampone

Bug description

When you try to change a Submission in the SubmissionCreated event, it will create a mysql duplicate error.
The submission in the SubmissionCreated event is not updated, but is trying to create a new entry in the database.

How to reproduce

Create SubmissionCreated listener and try to change the submission data and save it again.

Logs

Environment

stefan@Stefan-Business:~/webserver/easylife-de$ php please support:details

Environment
Application Name: -----------
Laravel Version: 12.11.1
PHP Version: 8.2.9
Composer Version: 2.6.6
Environment: production
Debug Mode: ENABLED
URL: localhost
Maintenance Mode: OFF
Timezone: Europe/Berlin
Locale: de

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: null
Cache: file
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 3
Sites: 1
Stache Watcher: Disabled (auto)
Static Caching: Disabled
Version: 5.55.0 PRO

Statamic Addons
aryehraber/statamic-captcha: 1.14.0
pecotamic/sitemap: 1.4.9
statamic/eloquent-driver: 4.21.1

Statamic Eloquent Driver
Asset Containers: file
Assets: file
Blueprints: file
Collection Trees: file
Collections: file
Entries: eloquent
Forms: file
Global Sets: file
Global Variables: file
Navigation Trees: file
Navigations: file
Revisions: file
Sites: file
Taxonomies: file
Terms: file
Tokens: file

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions