Skip to content

[4.x]: Duplicate fields when entry type changes and fields in first tab don't match #14030

@angieherrera

Description

@angieherrera

What happened?

Description

I have several entry types for a Resources section:
CleanShot 2023-12-12 at 19 04 39

For context, the Blog entry type has these fields:
CleanShot 2023-12-12 at 19 04 48

And a few of the other entry types has these fields (Product Briefs shown here):
CleanShot 2023-12-12 at 19 05 07

When creating a new entry in the Resources section, the default selected entry type is Blog (which is fine). That loads the fields as expected:
CleanShot 2023-12-12 at 19 05 19

But if I switch the entry type to Product Briefs, for example, I get duplicate fields like so which only resolve on page reload or entry/draft save:
CleanShot 2023-12-12 at 19 05 28

Steps to reproduce

  1. Create a section with more than one entry type.
  2. Have each entry type have slightly different fields.
  3. Create an entry and switch to the non-default entry type.

Expected behavior

No duplication of fields in the first tab.

Craft CMS version

4.5.11.1

PHP version

8.1.24

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

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