Node fields not changing when changing node type
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
- Add a node
- Try to change the node type
- 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
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.
Just ran into this and came to file an issue. It certainly "feels" broken. Have you had a chance to look into a solution?
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.