From 34b14dad65a1035e24f4a78b3816ad6398f28c09 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 15 Nov 2024 14:00:54 +1300 Subject: [PATCH] FIX Avoid infinite recursive loop with attributes in schemadata --- code/Forms/UploadField.php | 2 -- templates/SilverStripe/AssetAdmin/Forms/UploadField.ss | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/code/Forms/UploadField.php b/code/Forms/UploadField.php index 3417880ee..2f235b368 100644 --- a/code/Forms/UploadField.php +++ b/code/Forms/UploadField.php @@ -288,8 +288,6 @@ public function getAttributes() 'type' => 'file', 'multiple' => $this->getIsMultiUpload(), 'id' => $this->ID(), - 'data-schema' => json_encode($this->getSchemaData()), - 'data-state' => json_encode($this->getSchemaState()), ); $attributes = array_merge($attributes, $this->attributes); diff --git a/templates/SilverStripe/AssetAdmin/Forms/UploadField.ss b/templates/SilverStripe/AssetAdmin/Forms/UploadField.ss index 0868a5074..02e850c46 100644 --- a/templates/SilverStripe/AssetAdmin/Forms/UploadField.ss +++ b/templates/SilverStripe/AssetAdmin/Forms/UploadField.ss @@ -7,4 +7,4 @@ <% end_if %> - /> + data-schema="$SchemaData.JSON" data-state="$SchemaState.JSON" />