I have a single page section titled "About". At one point, I had assigned a "text" Rich Text field to the entry type layout. I then put some filler text in this field and saved the entry. Later I removed this field from the field layout.
The issue is that craft still populates this entry field on the front-end, i.e. {{ entry.text }}
still shows the filler text.
This is problematic for several reasons, but most importantly (in my scenario) because I am working on a search results template which shows an excerpt from each entry; different entries may have different fields available, so I am doing a basic if/else to see what fields may be available, i.e.:
{% if entry.text is defined %}
{{ entry.text }}
{% elseif entry.multiContent.text is defined %}
{{ entry.multiContent.text }}
{% endif %}
This raises two questions:
1) Is there a way to tell if an field is actually actively assigned to the entry layout?
2) I understand why the field data would be retained in the database even though the field was removed from the layout, but under what circumstances would populating 'deleted' fields for entries be desired behavior? It surely adds overhead, it is counter-intuitive (imo) and has the potential to cause all sort of issues.