Skip to content

Incorrect "field with the handle already exists" error on saving fieldset #9724

Description

@bastihilger

Bug description

I edited a field in a fieldset and could not save the changes (see "How to reproduce").

How to reproduce

Install a new statamic site (at least 4.53.0) with "statamic new"

Create a Fieldset "Foo" (handle "foo") with a Field "Bar" (handle "bar")

CleanShot 2024-03-13 at 10 38 13@2x

Reload the CMS (important, otherwise the error will not yet show up).

Click the field to edit it and then click "apply".

The error "A field with a handle of foo already exists." will show up.

CleanShot 2024-03-13 at 10 39 07@2x

This does not happen in v4.52.

Logs

No response

Environment

EnvironmentApplication Name: StatamicLaravel Version: 10.48.2PHP Version: 8.3.3Composer Version: 2.7.1Environment: localDebug Mode: ENABLEDURL: prove-error.testMaintenance Mode: OFFCacheConfig: NOT CACHEDEvents: NOT CACHEDRoutes: NOT CACHEDViews: CACHEDDriversBroadcasting: logCache: statamicDatabase: mysqlLogs: stack / singleMail: smtpQueue: syncSession: fileStatamicAddons: 0Antlers: runtimeSites: 1Stache Watcher: EnabledStatic Caching: DisabledVersion: 4.53.1 Solo

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

None

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions