Problem/Motivation
When viewing the media overview at /admin/content/media, right after enabling the module media_directories_ui, without doing any configuration, a WSOD happens with the following error:
TypeError: Argument 1 passed to Drupal\\Core\\Render\\Element::children() must be of the type array, null given, called in web/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php on line 952
Steps to reproduce
- Enable the media_directories_ui module
- Go to /admin/content/media
Proposed resolution
Make sure to pass a non-null value, when the vocabulary is not set.
Comments
Comment #2
ytsurkSo, you did not follow our installation instructions ;)
For sure, we missed to change to the entity api till now.
Still, the fields get installed, non-computed.
I can reproduce your error, having this error in the logs (and a WSOD):
TypeError: Argument 1 passed to Drupal\\Core\\Render\\Element::children() must be of the type array, null given, called in web/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php on line 952As soon as I save our config form (and choose a vocabulary) the error is gone, when I choose
- None -, the error comes back ..There should actually be an error message displayed, like in the Media browser tab.
I'll change this issue to the bug related to an empty setting field, where the view does not get NULL.
The entity API change will be covered in another issue, see also https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...
Comment #3
ytsurkSo here a patch for the views filter plugin.
Comment #4
ytsurkI created the issue for introducing the entity query api.
Comment #5
ytsurkComment #7
ytsurk