Media list view missing bulk actions

Created on 12 January 2022, almost 3 years ago
Updated 1 March 2024, 9 months ago

Problem/Motivation

Sector ships its own config for core Media list /admin/content/media via views.view.media.yml (to add title, usage data?) but this view lacks bulk actions (e.g. Media: Bulk update field). Bulk actions are available via the grid view.

Steps to reproduce

Visit /admin/content/media. Compare with /admin/content/media-grid. Also see core media admin ui screenshots https://www.drupal.org/docs/core-modules-and-themes/core-modules/media-l...

Proposed resolution

Add bulk update field to default Sector media admin view.

diff web/core/modules/media/config/optional/views.view.media.yml web/profiles/contrib/sector-distribution/config/install/views.view.media.yml
4a5
>     - field.storage.media.field_title
6a8
>     - entity_usage
13c15
< description: 'Find and manage media.'
---
> description: ''
21c23
<     display_title: Default
---
>     display_title: Master
29c31
<         type: tag
---
>         type: none
136,139c138,141
<         media_bulk_form:
<           id: media_bulk_form
<           table: media
<           field: media_bulk_form
---
>         mid:
>           id: mid
>           table: media_field_data
>           field: mid
143,144c145,146
<           label: ''
<           exclude: false
---
>           label: ID
>           exclude: true
176c178
<           element_label_colon: false
---
>           element_label_colon: true
184,186c186,200
<           action_title: Action
<           include_exclude: exclude
<           selected_actions: {  }
---
>           click_sort_column: value
>           type: number_integer
>           settings:
>             thousand_separator: ''
>             prefix_suffix: true
>           group_column: value
>           group_columns: {  }
>           group_rows: true
>           delta_limit: 0
>           delta_offset: 0
>           delta_reversed: false
>           delta_first_last: false
>           multi_type: separator
>           separator: ', '
>           field_api_classes: false
188c202,203
<           plugin_id: bulk_form
---
>           entity_field: mid
>           plugin_id: field
242c257
<           group_column: ''
---
>           group_column: entity_id
254a270,332
>         field_title:
>           id: field_title
>           table: media__field_title
>           field: field_title
>           relationship: none
>           group_type: group
>           admin_label: ''
>           label: Title
>           exclude: false
>           alter:
>             alter_text: false
>             text: ''
>             make_link: false
>             path: ''
>             absolute: false
>             external: false
>             replace_spaces: false
>             path_case: none
>             trim_whitespace: false
>             alt: ''
>             rel: ''
>             link_class: ''
>             prefix: ''
>             suffix: ''
>             target: ''
>             nl2br: false
>             max_length: 0
>             word_boundary: true
>             ellipsis: true
>             more_link: false
>             more_link_text: ''
>             more_link_path: ''
>             strip_tags: false
>             trim: false
>             preserve_tags: ''
>             html: false
>           element_type: ''
>           element_class: ''
>           element_label_type: ''
>           element_label_class: ''
>           element_label_colon: true
>           element_wrapper_type: ''
>           element_wrapper_class: ''
>           element_default_classes: true
>           empty: ''
>           hide_empty: false
>           empty_zero: false
>           hide_alter_empty: true
>           click_sort_column: value
>           type: string
>           settings:
>             link_to_entity: false
>           group_column: value
>           group_columns: {  }
>           group_rows: true
>           delta_limit: 0
>           delta_offset: 0
>           delta_reversed: false
>           delta_first_last: false
>           multi_type: separator
>           separator: ', '
>           field_api_classes: false
>           plugin_id: field
616a695,751
>         count:
>           id: count
>           table: entity_usage
>           field: count
>           relationship: media_to_usage_entity
>           group_type: sum
>           admin_label: ''
>           label: 'Usage count'
>           exclude: false
>           alter:
>             alter_text: false
>             text: ''
>             make_link: true
>             path: 'media/{{ mid }}/edit/usage'
>             absolute: false
>             external: false
>             replace_spaces: false
>             path_case: none
>             trim_whitespace: false
>             alt: ''
>             rel: ''
>             link_class: ''
>             prefix: ''
>             suffix: ''
>             target: ''
>             nl2br: false
>             max_length: 0
>             word_boundary: true
>             ellipsis: true
>             more_link: false
>             more_link_text: ''
>             more_link_path: ''
>             strip_tags: false
>             trim: false
>             preserve_tags: ''
>             html: false
>           element_type: ''
>           element_class: ''
>           element_label_type: ''
>           element_label_class: ''
>           element_label_colon: false
>           element_wrapper_type: ''
>           element_wrapper_class: ''
>           element_default_classes: true
>           empty: ''
>           hide_empty: false
>           empty_zero: false
>           hide_alter_empty: true
>           set_precision: false
>           precision: 0
>           decimal: .
>           separator: ','
>           format_plural: false
>           format_plural_string: !!binary MQNAY291bnQ=
>           prefix: ''
>           suffix: ''
>           plugin_id: numeric
617a753,795
>         field_title_value:
>           id: field_title_value
>           table: media__field_title
>           field: field_title_value
>           relationship: none
>           group_type: group
>           admin_label: ''
>           operator: contains
>           value: ''
>           group: 1
>           exposed: true
>           expose:
>             operator_id: field_title_value_op
>             label: Title
>             description: ''
>             use_operator: false
>             operator: field_title_value_op
>             identifier: field_title_value
>             required: false
>             remember: false
>             multiple: false
>             remember_roles:
>               authenticated: authenticated
>               anonymous: '0'
>               content_administrator: '0'
>               administrator: '0'
>               content_editor: '0'
>             placeholder: ''
>             operator_limit_selection: false
>             operator_list: {  }
>           is_grouped: false
>           group_info:
>             label: ''
>             description: ''
>             identifier: ''
>             optional: true
>             widget: select
>             multiple: false
>             remember: false
>             default_group: All
>             default_group_multiple: {  }
>             group_items: {  }
>           plugin_id: string
751,789d928
<         status_extra:
<           id: status_extra
<           table: media_field_data
<           field: status_extra
<           relationship: none
<           group_type: group
<           admin_label: ''
<           operator: '='
<           value: ''
<           group: 1
<           exposed: false
<           expose:
<             operator_id: ''
<             label: ''
<             description: ''
<             use_operator: false
<             operator: ''
<             operator_limit_selection: false
<             operator_list: {  }
<             identifier: ''
<             required: false
<             remember: false
<             multiple: false
<             remember_roles:
<               authenticated: authenticated
<           is_grouped: false
<           group_info:
<             label: ''
<             description: ''
<             identifier: ''
<             optional: true
<             widget: select
<             multiple: false
<             remember: false
<             default_group: All
<             default_group_multiple: {  }
<             group_items: {  }
<           entity_type: media
<           plugin_id: media_status
862c1001
<           content: 'No media available.'
---
>           content: 'No content available.'
864c1003,1013
<       relationships: {  }
---
>       relationships:
>         media_to_usage_entity:
>           id: media_to_usage_entity
>           table: media
>           field: media_to_usage_entity
>           relationship: none
>           group_type: group
>           admin_label: 'Usage information (Media)'
>           required: false
>           entity_type: media
>           plugin_id: standard
866a1016,1020
>       filter_groups:
>         operator: AND
>         groups:
>           1: AND
>       group_by: true
868c1022
<       max-age: 0
---
>       max-age: -1
874d1027
<         - user
876c1029,1030
<       tags: {  }
---
>       tags:
>         - 'config:field.storage.media.field_title'
896c1050
<       max-age: 0
---
>       max-age: -1
902d1055
<         - user
904c1057,1058
<       tags: {  }
---
>       tags:
>         - 'config:field.storage.media.field_title'
🐛 Bug report
Status

Needs review

Version

10.0

Component

Code

Created by

🇳🇿New Zealand jonathan_hunt

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.71.5 2024