From e476d43e041df9977bb4513e922bd2820ecbacb5 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 15 Nov 2024 14:00:23 +1300 Subject: [PATCH] FIX Avoid infinite recursive loop with attributes in schemadata --- src/Forms/HistoryViewerField.php | 15 --------------- .../VersionedAdmin/Forms/HistoryViewerField.ss | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/Forms/HistoryViewerField.php b/src/Forms/HistoryViewerField.php index 8459d45d..9a346fe6 100644 --- a/src/Forms/HistoryViewerField.php +++ b/src/Forms/HistoryViewerField.php @@ -113,21 +113,6 @@ public function getSchemaDataDefaults() return $data; } - /** - * When not used in a React form factory context, this adds the schema data to SilverStripe template - * rendered attributes lists - * - * @return array - */ - public function getAttributes() - { - $attributes = parent::getAttributes(); - - $attributes['data-schema'] = json_encode($this->getSchemaData()); - - return $attributes; - } - public function Type() { return 'history-viewer__container'; diff --git a/templates/SilverStripe/VersionedAdmin/Forms/HistoryViewerField.ss b/templates/SilverStripe/VersionedAdmin/Forms/HistoryViewerField.ss index 9cc9030c..a3432b0e 100644 --- a/templates/SilverStripe/VersionedAdmin/Forms/HistoryViewerField.ss +++ b/templates/SilverStripe/VersionedAdmin/Forms/HistoryViewerField.ss @@ -1,3 +1,3 @@ -
+
<%-- Rendered using the HistoryViewer React component --%>