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.

CommentFileSizeAuthor
#3 3251250-ensure_non_null_field_value-3.patch586 bytesytsurk

Comments

yonailo created an issue. See original summary.

ytsurk’s picture

Assigned: Unassigned » ytsurk

So, 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 952

As 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...

ytsurk’s picture

Title: Field "directory" is no longer created in D9 » WSOD after installation on media overview
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new586 bytes

So here a patch for the views filter plugin.

ytsurk’s picture

Priority: Normal » Major
Related issues: +#3251364: Introduce the entity update api

I created the issue for introducing the entity query api.

ytsurk’s picture

Assigned: ytsurk » Unassigned

  • ytsurk committed ac2b179 on 2.x
    Issue #3251250 by ytsurk, yonailo: WSOD after installation on media...
ytsurk’s picture

Status: Needs review » Fixed

  • ytsurk committed 88041df on 2.x
    Fixes issues resulting from the mix of #3251250 and #3247415
    

Status: Fixed » Closed (fixed)

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