Problem/Motivation
We have a number of issues around the confusing situation with Full/Default:
* #2834316: Node preview shows and defaults to "Default" instead of "Full" view mode
* #2639274: Unable to select "default" pseudo view mode in FieldFormatterFromViewDisplay configuration (not core, but relevant feedback from @yched)
* #2700147: Views uses non-existent "default" view mode, which causes Quick Edit to break
The main problem is that we have view displays and view modes and there is a default view display that is a fallback for all view modes that have no display enabled. The default view mode is "full" and there is often now view display enabled for it. And our API returns 'default' as fixed always-there default option instead of "Full".
Proposed resolution
@todo: Complete this, just some notes/ideas for now:
* Remove Default, make Full the fallback
* Maybe no fallback at all, no enabled display => no fields. Without a hierarchy of fallbacks, it is in 95% of the cases not what you want anyway
* Have a full view mode that always exists for all entity types
* Have locked view modes that can't be deleted
Maybe some changes can be done as improvements in 8.x, but changing the fallback concept and renaming default to full is IMHO 9.x only.
Comments
Comment #2
Wim LeersComment #3
Wim LeersFWIW: this came up on Twitter again: https://twitter.com/marcvangend/status/840148831270449152.
Comment #4
BerdirI assigned this to 9.x because it is a breaking change for configuration.
Now that 9.x has to be backwards compatible, I don't really know how to make the switch to not having a default view display.
Comment #5
Wim LeersWe have to figure out how to do this in 8. Perhaps our experiences in the past 2 years as a community have given us the insight how to do this in a BC way now.
Comment #6
andypostComment #16
ressa CreditAttribution: ressa at Ardea commentedThis would be a nice improvement. I am currently building a site, and feel like I need to update both "Default" and "Full" to not run into problems down the line ...
Removing Default, and make Full the fallback would be great.
Comment #17
dalemoore CreditAttribution: dalemoore commentedWhat does “Full” even mean? I know when you go to the screen you can tick the “Full content” box and give it its own view mode settings, but I’ve hardly ever done that. Not sure what “full content” means here. Is it all available fields? Doesn’t seem so. I’d love some context behind why it exists/it’s named that.
I don’t know that naming it full content is accurate. I can create a ton of fields and on the default or full mode display some fields that may not appear in some other view mode, or vice versa. For a paragraph, for instance, I might have a drop-down field to select a view mode on one display but not have that field on another display.
To me it makes sense to do the opposite, get rid of Full and keep Default. I have rarely ever enabled the Full content view mode personally, instead using the Default and creating new view modes as needed for teaser, cards, whatever. Makes more sense to me to have a Default view mode, which is a fallback when no other mode applies and is the “standard view” for that content type.
Comment #18
joachim CreditAttribution: joachim as a volunteer commentedJust been bitten by this. It's really hard to understand!
$entity_display_repository->getViewModes('node'); returns a list that contains 'full', but not 'default'.
But in the display admin UI, it's called 'default', and the config view display is called 'node.BUNDLE.default'.
But the CSS class on the viewed node says 'full' and the view mode in hook_entity_display_build_alter() is 'full'.
So... I think what's happening is that the 'full' mode is being requested, but that's not enabled, i.e. the 'full' view mode's status is 'false', which means in the admin UI it's not set to have custom display settings. So 'default' is being used as a fallback, but it's being presented *as if it were 'full', hence the CSS class and the view mode in hook_entity_display_build_alter().
Comment #19
geek-merlin@joachim: Like the IS states, and just like in Views, 'default' is the universal fallback:
Maybe it's mori intuitive UI-wise in views than in field UI. Also, there's maybe more use for this in a complex view.
I like the proposal from the IS, but it'll be quite a deprecation and update dance.