Problem/Motivation
The Media Library Widget is not working. See comment#6.
Proposed resolution
Recover the filed type (linked_entity_reference) and remove widget if Media Library is not enabled to avoid a dependency on it,.
Original report below
The readme says
"Configure the form display. There are 2 widgets provided:
Autocomplete: Supported when referencing all entity types.
Media library: Supported when referencing media entities
There is no field type defined for 'linked_media_library'.
There is for 'linked_entity_reference'.
Steps to reproduce
Install the module, link to a media field.
Proposed resolution
The widget exists. src/Plugin/Field/FieldWidget/LinkedMediaLibrary.php
Or apply the widget to the existing media reference? Is a new field required to enable storage of the link as opposed to MediaThumbnailFormatter.php.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork linked_entity_reference-3542148
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
Comment #2
interlated commentedComment #3
tunicI 'm not sure what this means. If you mean that you expect the module to create a linked_media_library field, that is not the case for this module. The user should create the field as needed. The module just provides the widgets and behaviour so it can be added to a field.
If this is not what you meant I would need more info to fully understand the problem.
Comment #4
interlated commentedThere is a field type with id = "linked_entity_reference",
There is none for "linked_media_library".
I can't create a new field of the type linked_media_library as described in the notes.
Comment #5
interlated commentedComment #6
tunicOk, I see the problem. During #3358368: Drupal 10 compatibility fixes the linked_media_library widget was changed: the field type it can be applied to changed from
linked_entity_referencetolinked_media_library. This was to solve an error apparently due to Drupal 10 compatibility, although it was just because Media Library module was not enabled. Changing the field type to something non-existent "solved" the issue because the widget was not processed anymore.The problem should be solved removing the widget if the Media Library module is not found.
Comment #8
tunicI think is fixed, can you try the dev version with the fix?
Comment #9
tunicComment #10
tunicFixed in 1.0.1.