From 22bc7a7b1a369f92aaf6596acc547cced081ea23 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..df0dc2c1 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 --%>