- Issue created by @charles belov
Whenever media is inserted in the WYSIWYG, the resulting code presents the data entity type as "media". This makes it impossible to tell from the code what the actual media type is. "media" it's not useful information because we already know it's media from the drupal-media tag. The data-entity-type attribute would properly distinguish the type of media.
Expected result:
<drupal-media data-entity-type="image" data-entity-uuid="[unique ID]"> </drupal-media>
<drupal-media data-entity-type="audio" data-entity-uuid="[unique ID]"> </drupal-media>
<drupal-media data-entity-type="document" data-entity-uuid="[unique ID]"> </drupal-media>
<drupal-media data-entity-type="external video" data-entity-uuid="[unique ID]"> </drupal-media>
<drupal-media data-entity-type="video" data-entity-uuid="[unique ID]"> </drupal-media>
Actual result:
<drupal-media data-entity-type="media" data-entity-uuid="[unique ID]"> </drupal-media>
<drupal-media data-entity-type="media" data-entity-uuid="[unique ID]"> </drupal-media>
<drupal-media data-entity-type="media" data-entity-uuid="[unique ID]"> </drupal-media>
<drupal-media data-entity-type="media" data-entity-uuid="[unique ID]"> </drupal-media>
<drupal-media data-entity-type="media" data-entity-uuid="[unique ID]"> </drupal-media>
The impact of this issue is that there is no way in Views to filter on media type. Therefore, if I want to return all pages that have the image media type, I will get false positives on pages that only have the other media types.
Option 1: Change the value of data-entity-type to contain the actual media type.
Option 2: Add a new attribute to the Drupal media tag to contain the actual media type.
Active
11.0 π₯
media system