-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
While creating a generic template such as an Archive template I added the Field block for two different post types: Event and TODO.
When viewing the Events archive the server attempted to render both fields, even though the TODO field, was not valid for Events.
There was also an issue where I'd changed the field name from _date to _start_date.
This was incorrectly echoing a value to the browser.
Requirements
- Server side rendering shouldn't attempt to render a field which is not valid for the current content.
- This should include invalid post types and/or field names.
Proposed solution
- Check the post type of the current post against the selected post type for the Field.
- Check the selected post type is a known post type.
- Check the field is associated to the current post type.
- For the front end, only display the output if all tests pass
- For the editor, display something useful.
- The logic should be consistent regardless of the value of the Show label toggle.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
