View display should not offer options to Revert to default or Apply all displays

Created on 17 January 2019, over 5 years ago
Updated 4 May 2023, about 1 year ago

If you create a new Entity Reference view display, you can go to 'Format:Entity Reference list | Settings' and change from 'apply to this display' to 'revert to default'. You shouldn't be able to 'revert to default' because the default Master view doesn't have Entity Reference list as a format option.

To recreate

  • Fresh site
  • download/enable entityreference and views (and dependencies)
  • Add new view
  • Default settings
  • Add display type: Entity Reference
  • Change Format Entity Reference list to 'Revert to default'
  • Format appears to be 'Unformatted list' but you can't save the view because you don't have search fields selected.
  • Then, under Format, select 'Entity Reference list' and Apply all displays.
  • Check the Page view and there is no format selected.

This might be more confusing than helpful but, to provide some context, I found this issue when I was reverting a feature. If you have views displays saved with 'revert to default' (which you shouldn't have the option to do) then every time the feature is reverted, the view resets the entity reference display to 'This entityreference (override).' Because it was previously saved as 'Revert to default', there are no search fields selected (because entity reference list settings don't exist for the Master/default display). The view becomes unsavable because there are no search fields selected. I've resolved my issue by changing the view display from default to overridden.

Other types of custom view displays don't allow you to select 'Revert to default' or 'Apply all displays' for this reason, e.g., https://www.drupal.org/project/views_data_export β†’ .

πŸ› Bug report
Status

Closed: outdated

Version

1.5

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States capysara

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024