Problem/Motivation
When you change the label of a field which also exists in other views, the label is changed everywhere and not just in the view you did the change. This is not acceptable as the same entity field (of different entity types) can have different meanings, for example the created
field of an entity. For nodes it has the meaning content "created at", while for group memberships it has the meaning of the user being a group "member since" (where the part inside the "" should be the label).
This especially affects views displayed as table in the non-admin theme when available space is limited due to the design and you want to display two or more fields in a single column and need to change the field label to display the meanings of both/all fields in that column. (BTW this is another use case for #1563612: Allow HTML in views field labels to allow <br>
inside the view label.)
Steps to reproduce
- Setup a fresh Drupal site using the Standard profile.
- Install the group module.
- Enable the media module (no further configuration needed, just to have its views there)
- Create a group type and a single group of that type.
- Change the views.view.group_members view
- Ensure that it contains both the "created" and "changed" fields in this order (other fields don't matter).
- Change the table display settings to display the "changed" field inside the "created" column, delimited by a
<br>
. - Change the label of the "created" field to
Created<br>Member
since (the line break will not work, see #1563612: Allow HTML in views field labels) orCreated / Member since
. - Change the label of the "changed" field to
Member since
. - Save the view.
- Display other views like views.view.content or views.view.media and check the table header of the merged columns.
- Export configuration and check the exported labels of the changed fields.
In my site, the nodes and media entities were not "Created at" but "Member since" after this, which obviously makes no sense.
Proposed resolution
Ensure that such changes are per view display and do not affect other displays of the same view (except when the changes are in the default display) or other views.
For localization (config translations) provide the combined view and view display ID as translation context.
Release notes snippet
Probably this needs a release note to make developers and site admins aware of this change.