From 2a1e2332d7676b75b1957c5265814e3ec98fddf9 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Wed, 16 May 2012 09:38:59 +0000 Subject: [PATCH] [-] BO : fix #PSCFV-2369 - post data is lost if there is an error while saving --- controllers/admin/AdminProductsController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 7f1e8ceb8..f6bb4faa6 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -2242,6 +2242,10 @@ class AdminProductsControllerCore extends AdminController { $this->_displayDraftWarning($this->object->active); + // if there was an error while saving, we don't want to lose posted data + if (!empty($this->errors)) + $this->copyFromPost($this->object, $this->table); + $this->initPack($this->object); $this->{'initForm'.$this->tab_display}($this->object); $this->tpl_form_vars['product'] = $this->object;