diff --git a/src/Controllers/ElementalAreaController.php b/src/Controllers/ElementalAreaController.php index 3a208e5c..4626fc3c 100644 --- a/src/Controllers/ElementalAreaController.php +++ b/src/Controllers/ElementalAreaController.php @@ -5,6 +5,7 @@ use DNADesign\Elemental\Forms\EditFormFactory; use DNADesign\Elemental\Models\BaseElement; use DNADesign\Elemental\Services\ElementTypeRegistry; +use SilverStripe\Admin\AdminRootController; use SilverStripe\CMS\Controllers\CMSMain; use SilverStripe\Control\HTTPRequest; use SilverStripe\Control\HTTPResponse; @@ -240,7 +241,7 @@ private function createElementForm(BaseElement $element): Form ); $urlSegment = $this->config()->get('url_segment'); - $form->setFormAction("admin/$urlSegment/elementForm/$id"); + $form->setFormAction(AdminRootController::admin_url("$urlSegment/elementForm/$id")); if (!$element->canEdit()) { $form->makeReadonly();