Using the experimental media library module, I get the following error when selecting the Browse Media button, and the Media Browser Never loads. I can add New Media without issue.

Also I did not the the preconfigured media types; had to create them myself. I'm not sure if perhaps this has something to do with it?

Also note that Drupal responses with a 200 status code even though it's an error.

AjaxError: 
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /admin/content/media-widget?media_library_widget_id=field_step_media-field_sections-0-subform&media_library_allowed_types%5Bimage%5D=image&media_library_allowed_types%5Bremote_video%5D=remote_video&media_library_remaining=1
StatusText: OK
ResponseText: Notice: Array to string conversion in Drupal\Component\Render\PlainTextOutput::renderFromHtml() (line 22 of /public_html/core/lib/Drupal/Component/Render/PlainTextOutput.php). => Array
(
[15: Drupal\Component\Render\PlainTextOutput::renderFromHtml()] => Array
(
[file] => core/lib/Drupal/Component/Render/PlainTextOutput.php:22
[args] => Array
(
[0] => Array
(
[#markup] => Media
[#allowed_tags] => Array
(
[0] => a
[1] => em
[2] => strong
[3] => cite
[4] => blockquote
[5] => code
[6] => ul
[7] => ol
[8] => li
[9] =&gt; dl<h2></h2>
[10] =&gt; dt
[11] =&gt; dd
)
)
)
)
[14: Drupal\Core\Ajax\Open…

Comments

jasonschweb created an issue. See original summary.

harrrrrrr’s picture

We have the same issue with the media browser form core. After some research it seems that views returns a renderable array instead of string for the title. I've found a patch fixing this for views shown in modals: https://www.drupal.org/project/drupal/issues/2663316#comment-12677787

feyp’s picture

This does indeed look very much like #2663316: Broken title in modal dialog when title is a render array. Thanks for finding that one @harrrrrrr. I'm going to close this as a duplicate. Feel free to reopen, if I missed something.