Correct and improve instructions for adding a custom or legacy media field

Created on 28 March 2024, 9 months ago
Updated 2 April 2024, 9 months ago

Problem/Motivation

The instructions for adding a custom or legacy (pre-Media module installation) media field are incorrect. It would be good to correct them so that they reflect what actually occurs in Drupal. On the help page, it would also help to not try to save verbiage at the cost of clarity.

As they stand, the instructions require the administrator to guess at the missing steps or distinguish between two options without understanding what the differences are between those two options.

Steps to reproduce

Steps:

  1. Go to simplytest.me
  2. In the form field, type core
  3. Choose Drupal core
  4. Click Launch sandbox to create the website with the latest version of Drupal core
  5. Once the site is created, login as admin
  6. In the administrator menu, click Extend
  7. In the form field, type media
  8. Check Media and Media Library
  9. Click Configure
  10. Click Structure
  11. Click Content types
  12. On the row for basic page, click Manage fields
  13. Click Create a new field
  14. Choose Media

    Result: See the following instruction:

    Use Media reference fields for most files, images, audio, videos, and remote media. Use File or Image reference fields when creating your own media types, or for legacy files and images created before installing the Media module. For more information, see the Media help page.

  15. Click the link for media help page

    Expected result: Additional information both about creating your own media types and for handling legacy files and images
    Actual result: Additional information both about creating your own media types, but only a repeat of the previous message concerning handling legacy files and images with no further information about that.

    The instructions at /admin/help/media include the following:

    Creating custom media types
    The Media module gives users with the Administer media types permission the ability to create new media types in addition to the default ones already configured. Each media type has an associated media source (such as the image source) which support thumbnail generation and metadata extraction. Fields managed by the Field module may be added for storing that metadata, such as width and height, as well as any other associated values.

    and

    Use Media reference fields for most files, images, audio, videos, and remote media. Use File or Image reference fields when creating your own media types, or for legacy files and images created before installing the Media module.

  16. Click the browser back button
  17. Choose Reference

    Expected result, based on the instructions: File and Image are options
    Actual result, which the instructions need to be changed to match: Neither file nor image is an option.

  18. Choose Content, in an attempt to muddle through without any certainty that this is the correct action
  19. Click Continue

    Expected result, based on the instructions: File and Image are options
    Actual result, which the instructions need to be changed to match: Nothing appears to be relevant

  20. Expand the drop-down menu for Type of item to reference, in an attempt to muddle through without any certainty that this is the correct action

    Expected result, based on the instructions: File and Image are options
    Actual result, which the instructions need to be changed to match: the following possibly relevant items appear in the list:

    File
    Media
    Image style

  21. Click the browser back button
  22. Choose Other, in an attempt to muddle through without any certainty that this is the correct action
  23. Click Continue

    Expected result, based on the instructions: File and Image are options
    Actual result, which the instructions need to be changed to match: Nothing appears to be relevant

  24. Expand the drop-down menu for Type of item to reference, in an attempt to muddle through without any certainty that this is the correct action

    Expected result, based on the instructions: File and Image are options
    Actual result, which the instructions need to be changed to match: the following possibly relevant items appear in the list:

    File
    Media
    Image style

    In other words, I don't see any difference between choosing Content or choosing Other. Is one better than the other? I don't see Image as a standalone item in the drop-down list. So at this point I'm not sure what to do. Will choosing using Media provide the desired functionality? I don't know.

Proposed resolution

Improve the instructions on /admin/structure/types/manage/page/fields/add-field to be brief and accurate.
Add more detailed instructions for legacy files and images on /admin/help/media to be more step-by-step and accurate.

On /admin/help/media, it would help on the instructions for legacy files and images to split out the instructions for legacy files from the instructions for legacy images rather than trying for brevity, even though it results in redundancy. That way the administrator doesn't have to parse all the "or"s.

Remaining tasks

User interface changes

Improve the instructions on /admin/structure/types/manage/page/fields/add-field to be brief and accurate.
Improve the instructions for legacy files and images on /admin/help/media to be more step-by-step and accurate.

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
MediaΒ  β†’

Last updated about 6 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States charles belov San Francisco, CA, US

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024