- Issue created by @joaopauloc.dev
When using a media document with the cardinality set to unlimited. Only the first file link to download works. All the following files have the wrong link.
Go to /admin/structure/media/manage/document/fields
Click to edit the Document(field_media_document) /admin/structure/media/manage/document/fields/media.document.field_media_document
Set this field as unlimited and save.
Create a node that uses the document media field and add more than one file.
Access the view node and try to download the files.
This is how the link at the second position is displayed.
With the wrong parameter, the controller doesn't handle the delta downloading the first file of the list.
Fix the variable at DownloadLinkFieldFormatter::viewElements line 100 to $url_options instead of $route_parameters.
This bug seems like a typo or merge error.
Whatever, I'm attaching a proposal fix.
Active
2.0
Code