Skip to content

[5.x]: Preserving content between non multi-instance fields appears possible, but isn’t #16056

@kennethormandy

Description

@kennethormandy

What happened?

Description

Matrix fields with customize handles appear as though they can preserve content while switching entry types, but can’t.

Steps to reproduce

  1. Create a section with two entry types, ex. “Simple Page” and “Landing Page.”
  2. The former has a Matrix field with the handle pageContent.
  3. The latter has a different Matrix field (supporting many or all of the same entry types), and customized to so it has the same pageContent handle.
  4. If you switch between the “Simple Page” and “Landing Page” entry types, it looks like it has preserved the content across the matrix fields—except then once you save, it’s gone.

Expected behavior

When changing the entry types, you don’t see the content from the “Single Column” entry type in the matrix field.

Obviously if it’s possible to preserve the content, that would be great, but my understanding is that’s not supposed to be possible.

Actual behavior

You see the existing content from the “Single Column” entry type, until you save, and then it has disappeared. Ie. it gives you the impression the content can be preserved, when it won’t be.

Craft CMS version

5.4.10

PHP version

8.2

Operating system and version

No response

Database type and version

Postgres 14

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions