Skip to content

[5.x]: When creating a draft and changing the entry type at the same time, some field value changes are not saved #17768

@bleepsandblops

Description

@bleepsandblops

What happened?

Description

When opening an entry, changing the entry type and changing fields that are shared with the other entry type (a lightswitch for example), that change is not saved when you click on 'save draft'. Furthermore it's not saved even if you try again after that initial save draft.

Steps to reproduce

  1. Create two identical entry types with a lightswitch and a plain text field, and put them in a structure
Image
  1. Create a new entry with Type B, save it, leave fields empty / unchecked.
  2. Open the entry, then change the entry type to Type A and click on 'Create a draft'
  3. Check the lightswitch and click on 'save draft', it stays unchecked. Try again, you can never make it checked.

Expected behavior

The fields should change. In my local test the text field doesn't seem to be affected, but on the production site it also doesn't change. Same with an asset field. However an entries field seems to save fine.

Actual behavior

Craft CMS version

5.8.15

PHP version

No response

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