Skip to content

Duplicate IDs on form submissions #14972

Description

@danielfowler

Bug description

On my site, when a performer signs up for an audition, it triggers two forms - a confirmation to the performer and a notification to the director(s) - and these two submissions have identical timestamps. It seems the Stache treats these as duplicate IDs instead of realizing they're in separate form directories.

Here's the thread from Discord between me and @edalzell : https://discord.com/channels/489818810157891584/1430960589966147708

I created a fresh site and was able to reproduce the issue. http://github.com/danielfowler/dupes

How to reproduce

  1. Create two forms
  2. Use JS to post both forms on a button click
  3. See their filenames are identical
  4. See Duplicate IDs in CP (maybe after a Stache refresh)

Logs

[2026-07-09 19:11:42] local.ERROR: Call to a member functionpath() on null {"userId":"4ce4f9ad-6ab3-4244-aafe-761bb2bd9fc5","exception":"[object] (Error(code: 0): Call to a member function path() on null at D:/Websites/dupes/vendor/statamic/cms/src/Stache/Duplicates.php:24)[stacktrace]#0 [internal function]: Statamic/Stache/Duplicates->{closure:{closure:Statamic/Stache/Duplicates::all():21}:22}(Array, '1783623619.9373')#1 D:/Websites/dupes/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(830): array_map(Object(Closure), Array, Array)#2 D:/Websites/dupes/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(827): Illuminate/Support/Arr::map(Array, Object(Closure))#3 D:/Websites/dupes/vendor/statamic/cms/src/Stache/Duplicates.php(22): Illuminate/Support/Collection->map(Object(Closure))#4 [internal function]: Statamic/Stache/Duplicates->{closure:Statamic/Stache/Duplicates::all():21}(Array, 'form-submission...')#5 D:/Websites/dupes/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(830): array_map(Object(Closure), Array, Array)#6 D:/Websites/dupes/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(827): Illuminate/Support/Arr::map(Array, Object(Closure))#7 D:/Websites/dupes/vendor/statamic/cms/src/Stache/Duplicates.php(21): Illuminate/Support/Collection->map(Object(Closure))#8 D:/Websites/dupes/vendor/statamic/cms/src/Http/Controllers/CP/DuplicatesController.php(28): Statamic/Stache/Duplicates->all()#9 D:/Websites/dupes/vendor/statamic/cms/src/Http/Controllers/CP/DuplicatesController.php(21): Statamic/Http/Controllers/CP/DuplicatesController->getDuplicates()#10 D:/Websites/dupes/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Statamic/Http/Controllers/CP/DuplicatesController->index()#11 D:/Websites/dupes/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate/Routing/Controller->callAction('index', Array)#12 D:/Websites/dupes/vendor/laravel/framework/src/Illuminate/Routing/Route.php(275): Illuminate/Routing/ControllerDispatcher->dispatch(Object(Illuminate/Routing/Route), Object(Statamic/Http/Controllers/CP/DuplicatesController), 'index')#13 D:/Websites/dupes/vendor/laravel/framework/src/Illuminate/Routing/Route.php(215): Illuminate/Routing/Route->runController()

Environment

EnvironmentLaravel Version: 13.19.0PHP Version: 8.5.8Composer Version: 2.9.8Environment: localDebug Mode: ENABLEDMaintenance Mode: OFFTimezone: UTCLocale: enCacheConfig: NOT CACHEDEvents: NOT CACHEDRoutes: NOT CACHEDViews: CACHEDDriversBroadcasting: logCache: fileDatabase: sqliteLogs: stack / singleMail: logQueue: syncSession: fileStorageD:\Websites\dupes\public\storage: NOT LINKEDStatamicAddons: 0License Key: Not setSites: 1Stache Watcher: Enabled (auto)Static Caching: DisabledVersion: 6.24.2 PRO

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions