From b9192e551ca1fab09bedd4e91d0d299df18952bd Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 16 Dec 2013 16:22:14 +0100 Subject: [PATCH] fix missing general form on seo form error --- .../Controller/Admin/AbstractSeoCrudController.php | 12 ++++++++++++ templates/backOffice/default/includes/seo-tab.html | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/core/lib/Thelia/Controller/Admin/AbstractSeoCrudController.php b/core/lib/Thelia/Controller/Admin/AbstractSeoCrudController.php index c4c453908..f64a0ce6d 100644 --- a/core/lib/Thelia/Controller/Admin/AbstractSeoCrudController.php +++ b/core/lib/Thelia/Controller/Admin/AbstractSeoCrudController.php @@ -209,6 +209,16 @@ abstract class AbstractSeoCrudController extends AbstractCrudController $error_msg = $ex->getMessage();*/ } + // Load object if exist + if (null !== $object = $this->getExistingObject()) { + + // Hydrate the form abd pass it to the parser + $changeForm = $this->hydrateObjectForm($object); + + // Pass it to the parser + $this->getParserContext()->addForm($changeForm); + } + $this->setupFormErrorContext( $this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)), $error_msg, @@ -216,6 +226,8 @@ abstract class AbstractSeoCrudController extends AbstractCrudController $ex ); + + // At this point, the form has errors, and should be redisplayed. return $this->renderEditionTemplate(); } diff --git a/templates/backOffice/default/includes/seo-tab.html b/templates/backOffice/default/includes/seo-tab.html index 16b31ecb7..5c2d94ea9 100644 --- a/templates/backOffice/default/includes/seo-tab.html +++ b/templates/backOffice/default/includes/seo-tab.html @@ -1,6 +1,6 @@
-
+ {include file = "includes/inner-form-toolbar.html"