Be more helpful if there's no bundle to choose from

Created on 17 February 2019, over 5 years ago
Updated 30 April 2024, about 2 months ago

Problem/Motivation

Right after installing Media (or: Taxonomy etc.) module, adding a Media (or Term reference) field to some entity type fails as there's no media type (or Vocabulary) to select from.

In a way this is to be expected. However, the missing checkboxes widget and the subsequent error message aren't very helpful:


(This is with inline form errors. Same problem slightly worse with form errors just at the top.)

1.) We should make sure at least an empty select is always presented to point the sitebuilder to the problem, before hitting an error message. This would probably hold for all kinds of entity references where target bundles are missing.

2.) This is the first impression the sitebuilder gets of the Media (or: Taxonomy) module. So we should either preinstall some basic media type (or vocabulary), so the module can be used rightaway, or redirect the sitebuilder to admin/structure/media (or: whatever) before they get to the field settings, or at the very least present a link to where they can create a bundle or two.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Entity reference 

Last updated 27 days ago

No maintainer
Created by

Pancho UTC+2 🇪🇺 EU

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

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

  • Needs usability review

    Used to alert the usability topic maintainer(s) that an issue significantly affects (or has the potential to affect) the usability of Drupal, and their signoff is needed. When adding this tag, make it easy to review the issue. Make sure the issue summary describes the problem and the proposed solution. Screenshots usually help a lot! To get sign-off on issues with the "Needs usability review" tag, post about them in the #ux channel on Drupal Slack, and/or attend a UX meeting to demo the patch and get direct feedback from designers/UX folks/product management on next steps. If an issue represents a significant new feature, UI change, or change to the general "user experience" of Drupal, use Needs product manager review instead. See the scope of responsibilities for product managers.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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.

  • 🇳🇿New Zealand quietone New Zealand

    I tested this on Drupal 10.1.x., minimal install and was able to reproduce the problem. Fox example, for media the error message was 'Media type field is required." but the 'media type' field had no data.

    The same thing happens with comments as well. I am adding a related issue, which may be a duplicate. I am not sure.

    This needs an issue summary update, adding tag.

  • First commit to issue fork.
  • Status changed to Needs review about 2 months ago
  • 🇫🇮Finland mErilainen

    This changes the message to be an error displayed on the form element. See the attachment how it looks like.

  • Pipeline finished with Failed
    about 2 months ago
    Total: 618s
    #158267
  • Status changed to RTBC about 2 months ago
  • 🇫🇮Finland TomiMikola

    Nice improvement! Clear visual indication now for the missing bundles. Tested and works as expected, code looks ok too.

    The usability seems to much better now but leaving this up to the committer if additional usability review is needed or not. For me this already improves usability quite much.

  • Status changed to Needs work about 2 months ago
  • 🇺🇸United States xjm

    The MR is failing tests and not mergeable. Thanks!

  • 🇺🇸United States xjm

    I also don't see any record of the usability review happening. @TomiMikola, please leave it up to the usability team and maintainers as to whether a usability review is required. Issues should not be marked RTBC when a usability review has been requested but has not happened yet.

    In order to prepare for the usability team reviewing this, the MR should be gotten into a state where it applies and passes tests, and the issue summary should be updated with screenshots of the current "before" and "after" (both of which should be updated to show 11.x HEAD, since this issue is 5 years old).

    Finally, we should investigate the relationship between this issue and the one @quietone linked.

    Thanks everyone!

Production build 0.69.0 2024