diff --git a/modules/search_api_pantheon_admin/src/Form/PantheonSolrAdminForm.php b/modules/search_api_pantheon_admin/src/Form/PantheonSolrAdminForm.php index 6773cbdc..709e1cc7 100644 --- a/modules/search_api_pantheon_admin/src/Form/PantheonSolrAdminForm.php +++ b/modules/search_api_pantheon_admin/src/Form/PantheonSolrAdminForm.php @@ -79,6 +79,10 @@ public function buildForm( '#group' => 'status', '#weight' => substr($filename, 0, -3) === 'xml' ? -10 : 10, ]; + + if ( ! is_string($file_contents)) { + $file_contents = json_encode($file_contents); + } $form[$filename][] = $this->getViewSolrFile($filename, $file_contents, $is_open); $is_open = FALSE; }