Update to use the Drupal Core media fields instead of our custom field names & remove duplicate file fields

Created on 15 September 2022, over 2 years ago
Updated 25 April 2024, 10 months ago

Problem/Motivation

For historic reasons, our fields in media have different names from what core provides. That's bad as it makes the module less compatible, especially as we'd like to base as much as possible on core media!

  • field_media_audio_file IS FINE! (Audio)
  • field_image is NOT FINE, should be field_media_image (Image, SVG Image, Slide)
  • field_document is NOT FINE, should be field_media_document (Document)
  • field_video_file is NOT FINE, should be field_media_video_file (Video (from file))
  • field_media_oembed_video IS FINE (Video (Remote))

See web/core/profiles/standard/config/optional for details from core.

Steps to reproduce

Proposed resolution

Write an update hook to create the same fields with the regular name from core and migrate over all values from the existing database tables. Afterwards remove the old fields, but ensure the files are not deleted.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: duplicate

Version

4.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

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