Problem/Motivation

This is a fantastic module and provided needed functionality for my project. However, I need to be able to reference unpublished media as well. Luckily this wasn't difficult to accomplish. I've attached a patch that adds the feature and works as expected on my site (Drupal 10.1.8).

Steps to reproduce

  1. Install the patch.
  2. Go to a content type with a media reference field.
  3. Edit the media reference field.
  4. Change the reference method to "Unpublished Default" (consistent with changing the reference method for nodes and taxonomy terms).
  5. Click Save.

Proposed resolution

Patch attached!

Remaining tasks

Community feedback and testing.

User interface changes

Added "Unpublished Default" reference method for media entities.

CommentFileSizeAuthor
#2 3423302-2.patch1.4 KBjsutta
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jsutta created an issue. See original summary.

jsutta’s picture

StatusFileSize
new1.4 KB

Patch attached.

dieterholvoet made their first commit to this issue’s fork.

dieterholvoet’s picture

Status: Active » Reviewed & tested by the community

I had to change the id to make it work, since the id was still the same one as the unpublished node selection handler. After that it worked.

dieterholvoet’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.