When trying to set the display of a file field, the Ajax spinner runs forever. Error log shows this PHP error:
Short version:
ArgumentCountError: Too few arguments to function Drupal\file_download_link\Plugin\Field\FieldFormatter\FileDownloadLink::__construct(), 7 passed in /core/lib/Drupal/Core/Field/FormatterPluginManager.php on line 67 and exactly 9 expected n Drupal\file_download_link\Plugin\Field\FieldFormatter\FileDownloadLink->__construct() (Zeile 66 in /modules/contrib/file_download_link/src/Plugin/Field/FieldFormatter/FileDownloadLink.php)
I can post the full error code but I guess it is not more helpful than that.
I am using Core Media module, Media type file, and this inside a paragraph
But should that even matter? Since I get the error when trying to configure display for the file field of the file media type.
Drupal version: 8.7.11
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | file_download_link--bug--3111666--3.patch | 2 KB | danflanagan8 |
Comments
Comment #2
danflanagan8Thanks for the report, eigentor.
I haven't been running the tests on 8.7.x so I missed this error. I just ran the tests and confirmed the error occurs in 8.7.x.
https://www.drupal.org/pift-ci-job/1568404
I'll see what I can do.
Comment #3
danflanagan8I explicitly added ContainerFactoryInterface to the formatters and that seemed to do the trick. Perhaps one of the parent classes removed that interface at some point? Seems to be back in 8.8.x. Here's a patch for anyone on 8.7.x.
Comment #4
danflanagan8Comment #6
danflanagan8Comment #7
danflanagan8