Bug description
I'm seeing an issue where the terms field shows terms twice, allows selecting both and will submit both, leading to possibly corrupt data when deleting one of the duplicates. This only seems to happen for the typeahead field.
The real issue seems to happen when selecting both of the duplicates, then removing one of them, and saving. The data is now indexed numerically, but skips an index. The term field refuses to show any data afterwards. See screenshots below.
The examples below are showing a terms field in select mode with three existing terms A, B, and C.
-
handle: tagsfield:
mode: selecttaxonomies:
- tagstype: termsdisplay: Tags
Duplicate options

Duplicate selection

Duplicate submission payload

Corrupt data when submitting with one duplicate deleted

Broken input after submitting with one duplicate deleted

How to reproduce
- Install from cli
- Create taxonomy
tags - Add
terms field to pages collection, limited to tags taxonomy, with typeahead input - Create new terms
A, B, and C - Edit page from collection
- Enter
A into term field A should appear twice, and should be selectable twice- Select and add both available
A options - Select and add both available
B options - Remove the first one of each
- Save
- Reload
Logs
No response
Environment
EnvironmentApplication Name: StatamicLaravel Version: 11.29.0PHP Version: 8.3.3Composer Version: 2.5.1Environment: localDebug Mode: ENABLEDURL: statamic-terms-test.testMaintenance Mode: OFFTimezone: UTCLocale: enCacheConfig: NOT CACHEDEvents: NOT CACHEDRoutes: NOT CACHEDViews: CACHEDDriversBroadcasting: logCache: fileDatabase: sqliteLogs: stack / singleMail: logQueue: syncSession: fileStatamicAddons: 0Sites: 1Stache Watcher: Enabled (auto)Static Caching: DisabledVersion: 5.34.0 Solo
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
Bug description
I'm seeing an issue where the terms field shows terms twice, allows selecting both and will submit both, leading to possibly corrupt data when deleting one of the duplicates. This only seems to happen for the
typeaheadfield.The real issue seems to happen when selecting both of the duplicates, then removing one of them, and saving. The data is now indexed numerically, but skips an index. The term field refuses to show any data afterwards. See screenshots below.
The examples below are showing a
termsfield inselectmode with three existing terms A, B, and C.Duplicate options
Duplicate selection
Duplicate submission payload
Corrupt data when submitting with one duplicate deleted
Broken input after submitting with one duplicate deleted
How to reproduce
tagstermsfield topagescollection, limited totagstaxonomy, withtypeaheadinputA,B, andCAinto term fieldAshould appear twice, and should be selectable twiceAoptionsBoptionsLogs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response