Problem/Motivation

https://www.drupal.org/project/drupal/issues/3388913 introduces a breaking change, by required the $row->mid property be set for rendering src/Plugin/views/field/MediaLibrarySelectForm.php.

The current class does not provide an MID, since the entity is external to Drupal. This causes a fatal error when using the module's media library,

It also affects 1.1-dev.

Steps to reproduce

Install 10.3. Try to use the module.

Proposed resolution

Fix the broken class

Remaining tasks

Fix the broken class

User interface changes

None

API changes

None

Data model changes

None

Issue fork acquia_dam-3442662

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

agentrickard created an issue. See original summary.

agentrickard’s picture

Status: Active » Needs review
japerry’s picture

Ohh, thanks for catching that Ken! I've escalated it internally so we can get it fixed in both 1.0 and the upcoming 1.1 release.

japerry’s picture

Looking at views_remote_data as well -- since I'm guessing any derivative plugin will have this issue as well.

agentrickard’s picture

Maybe -- though I haven't run into that yet.

japerry’s picture

Status: Needs review » Needs work

Okay I spent some time on this today, and this issue is a doozy.

1) This -will- break 10.2 and earlier, unless a BC shim is added. This will be necessary before committing.
2) The tests (automated and manual) are failing because of the change. Interestingly, the dev tests say they are passing, but if you look at the debug output they are also failing for 10.3.
3) I'm a little leary of using the uuid from the asset as the mid because a) there is an associated mid after it is created and b) not sure how non-numeric indexes work here.

So I'm a bit worried about how we handle this missing media id in the view. Will try to get Matt's time to look at it sometime later in May, but before Drupal 10.3 comes out.

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

mglaman’s picture

Cherry-picked commit from https://git.drupalcode.org/project/acquia_dam/-/merge_requests/47 which fixes the mock handler and should clear up some errors.

japerry’s picture

Status: Needs work » Fixed

Fixed!

Status: Fixed » Closed (fixed)

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