navigation icon indicating copy to clipboard operation
navigation copied to clipboard

Node fields not changing when changing node type

Open WHITE-developer opened this issue 3 years ago • 3 comments

Describe the bug

When you switch the node type the fields that are shown aren't updated. You have to close and reopen the sidebar to see the right fields

Steps to reproduce

  1. Add a node
  2. Try to change the node type
  3. The fields of the node won't change until you close and reopen the sidebar

Craft CMS version

4.3.1

Plugin version

2.0.10

Multi-site?

Yes

Additional context

No response

WHITE-developer avatar Nov 08 '22 07:11 WHITE-developer

Yep, a known issue with the element slide-out editor, and I've spoken with @brandonkelly about this. It's really down to how the field layout elements work, in that if a custom field has changed it's not re-rendered. Because we use a single fieldlayoutelement to render the settings for a particular node type, this isn't being treated as "changed". Instead, the slide-out will look at the fieldlayoutelement, see that it's already there, and use the cached version.

To get around this, we'd need to do some significant side-stepping, which I've yet to figure out.

engram-design avatar Nov 08 '22 08:11 engram-design

Just ran into this and came to file an issue. It certainly "feels" broken. Have you had a chance to look into a solution?

Mosnar avatar Feb 14 '23 15:02 Mosnar

Haven't been able to figure this one out yet, sorry. We'd have to do a whole lot of work and re-inventing the wheel to pull this off.

engram-design avatar Feb 16 '23 02:02 engram-design