Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kennethormandy opened this issue Nov 8, 2024 · 1 comment
Assignees
Labels

Comments

@kennethormandy
Copy link
Contributor

kennethormandy commented Nov 8, 2024

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

@i-just
Copy link
Contributor

i-just commented Nov 11, 2024

Thanks Kenneth! I raised a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants