From fdbe38d44483d3b990e447efaa3d3407433fe04b Mon Sep 17 00:00:00 2001 From: Antony Thorpe Date: Thu, 15 Jun 2017 13:53:38 +1200 Subject: [PATCH] Bugfix: SS4 Right click, add page fails `addForm` receives both POSTs and GETs. Set the form's `strictFormMethodCheck` to false to avoid `405 Method Not Allowed` error response. Issue #1846. --- code/Controllers/CMSPageAddController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Controllers/CMSPageAddController.php b/code/Controllers/CMSPageAddController.php index 106b8539..504da0fe 100644 --- a/code/Controllers/CMSPageAddController.php +++ b/code/Controllers/CMSPageAddController.php @@ -149,7 +149,7 @@ class CMSPageAddController extends CMSPageEditController "AddForm", $fields, $actions - )->setHTMLID('Form_AddForm'); + )->setHTMLID('Form_AddForm')->setStrictFormMethodCheck(false); $form->setAttribute('data-hints', $this->SiteTreeHints()); $form->setAttribute('data-childfilter', $this->Link('childfilter')); $form->setValidationResponseCallback(function (ValidationResult $errors) use ($negotiator, $form) {