Change Standard profile to use Media instead of image fields

Created on 13 January 2022, over 2 years ago
Updated 10 March 2024, 4 months ago

Problem/Motivation

The Standard install profile should be an example of the correct ways to work with Drupal.

However, the article node type has an image field, whereas the recommended way to work with images in Drupal is now to use Media entities and a media reference field.

Steps to reproduce

Proposed resolution

1. Add Media to the Standard install profile
2. Add an Image media type
3. Change the image field on article nodes to be a media reference field

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

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

  • πŸ‡ΊπŸ‡ΈUnited States W01F

    Just following up this is still an issue with default user fields as well. I'm currently having an issue where we replaced the default user_picture image field with a media entity reference field, but the images for posts and comments relies on the image field.

  • πŸ‡¬πŸ‡§United Kingdom catch

    I'm not sure why #2 is suggesting the must-haves in #2825215: Media initiative: Roadmap β†’ block this issue, none of the media modules are experimental any more. This might be lower priority than some of those issues, but I don't think it's blocked on them.

  • First commit to issue fork.
  • Merge request !6913Adding media to standard profile β†’ (Open) created by kostyashupenko
  • Pipeline finished with Failed
    4 months ago
    Total: 518s
    #111509
  • Pipeline finished with Failed
    4 months ago
    Total: 548s
    #111534
  • Pipeline finished with Canceled
    4 months ago
    Total: 21s
    #111701
  • Pipeline finished with Failed
    4 months ago
    Total: 551s
    #111703
  • Status changed to Needs review 4 months ago
  • πŸ‡·πŸ‡ΊRussia kostyashupenko Omsk

    Done i think, but some CI jobs are failed.
    I also have fixed Olivero theme in the relation with this task

    Keeping on Needs review to have more eyes on the MR itself

  • Status changed to Needs work 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Since this changing the starter point for all new projects want to make sure it has proper sign off.

    Has test failures though.

  • πŸ‡«πŸ‡·France nod_ Lille

    Seems like there is a critical bug in the way πŸ› Deleting a Media view mode should not result in the deletion of an entire text format Needs work

  • Status changed to Needs review 4 months ago
  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    Looked at this as a core product manager. The must haves in #2825215: Media initiative: Roadmap β†’ are officially in the way but neither the Media initiative nor the later announced Easy out of the Box initiative achieved them. So I think in practice people install media and use it without those being resolved. The question remains whether its better to stick to the outdated solution when the new one is there, but is not yet perfect. The critical bug linked by @nod_ is the only bug in the must have list, the rest are features. I think critical data loss bugs are hard to argue with, so that would indeed need to be fixed as a minimum. Otherwise I think there is a higher change that the rest of the gaps are fixed once we put this into people's faces.

    Commit IMHO should be postponed on πŸ› Deleting a Media view mode should not result in the deletion of an entire text format Needs work but since there is work left here that can be done independently of that, leaving status as-is.

  • Status changed to Needs work 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thanks @gabor hojtsy! If someone could resolve the test failure

    But will agree ultimately https://www.drupal.org/project/drupal/issues/3326447 πŸ› Deleting a Media view mode should not result in the deletion of an entire text format Needs work should land first.

  • πŸ‡¬πŸ‡§United Kingdom catch

    #13 makes complete sense to me.

    The biggest issue with the current situation is that once you're using image fields, it's hard to migrate to media fields - there's are contrib modules like https://www.drupal.org/project/migrate_image_to_media β†’ but that one for example has no published releases. So if people install standard, leave the article content type more or less as is, and go from there, they're eventually going to want media fields and then get stuck.

Production build 0.69.0 2024