Skip to content

[5.x]: Unable to change field handle for a global field #16963

@joshwalsh

Description

@joshwalsh

What happened?

Description

When I add an existing field to a global, I am unable to change the fieldHandle.

Steps to reproduce

  1. Take an existing field, in my case is an asset field, and drag it into the field layout within a globals section.
  2. Save that globals section, successfully.
  3. Click the "..." next to that asset field and give it a new contentHandle. (It doesn't matter what you change it to)
  4. Click "Apply"... looks successful
  5. Click Save on the global page.
  6. Met with InvalidFieldException

Image

Expected behavior

This should give the instance of the field the desired name, as it does correctly in Entry Types.

Actual behavior

Throws above exception.

Craft CMS version

5.6.12

PHP version

8.2.18

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

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