diff --git a/src/Controllers/ElementalAreaController.php b/src/Controllers/ElementalAreaController.php index df04af91..9acb5b0e 100644 --- a/src/Controllers/ElementalAreaController.php +++ b/src/Controllers/ElementalAreaController.php @@ -5,7 +5,7 @@ use DNADesign\Elemental\Forms\EditFormFactory; use DNADesign\Elemental\Models\BaseElement; use DNADesign\Elemental\Services\ElementTypeRegistry; -use SilverStripe\Control\HTTPResponse; +use SilverStripe\Admin\AdminRootController; use SilverStripe\Core\Injector\Injector; use SilverStripe\Forms\Form; use SilverStripe\Core\Validation\ValidationException; @@ -17,6 +17,7 @@ use DNADesign\Elemental\Models\ElementalArea; use DNADesign\Elemental\Services\ReorderElements; use Exception; +use SilverStripe\Control\HTTPResponse; use SilverStripe\Control\HTTPRequest; use InvalidArgumentException; use SilverStripe\Admin\FormSchemaController; @@ -404,7 +405,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(); diff --git a/yarn.lock b/yarn.lock index aebf98bb..98ea88c1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2892,9 +2892,9 @@ create-jest@^29.7.0: prompts "^2.0.1" cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.5.tgz#910aac880ff5243da96b728bc6521a5f6c2f2f82" - integrity sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug== + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0"