From 6882b199d90b8747992026512fcfaec30f3cd564 Mon Sep 17 00:00:00 2001 From: sukhwinder-somar Date: Tue, 10 Oct 2023 10:24:02 +1300 Subject: [PATCH] change inst to BaseElement instead of SiteTree --- src/Control/ElementFormController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Control/ElementFormController.php b/src/Control/ElementFormController.php index 1abd2c9..a19a4b2 100644 --- a/src/Control/ElementFormController.php +++ b/src/Control/ElementFormController.php @@ -2,13 +2,13 @@ namespace DNADesign\ElementalUserForms\Control; +use DNADesign\Elemental\Models\BaseElement; use DNADesign\Elemental\Controllers\ElementController; use SilverStripe\Control\Controller; use SilverStripe\Control\Director; use SilverStripe\Core\Injector\Injector; use SilverStripe\UserForms\Control\UserDefinedFormController; use SilverStripe\UserForms\Form\UserForm; -use SilverStripe\CMS\Model\SiteTree; class ElementFormController extends ElementController { @@ -61,7 +61,7 @@ public function finished() return null; } - while (!$page instanceof SiteTree) { + while ($page instanceof BaseElement) { $page = $page->getPage(); if ($page === null) {