diff --git a/core/lib/Thelia/Controller/Admin/ModuleController.php b/core/lib/Thelia/Controller/Admin/ModuleController.php index ec7ff472f..4a22c868a 100644 --- a/core/lib/Thelia/Controller/Admin/ModuleController.php +++ b/core/lib/Thelia/Controller/Admin/ModuleController.php @@ -70,9 +70,13 @@ class ModuleController extends BaseAdminController if($this->getRequest()->isXmlHttpRequest()) { if($message) { - $response = $this->nullResponse($message, 500); + $response = $this->jsonResponse(json_encode(array( + "error" => $message + )), 500); + } else { + $response = $this->nullResponse(); } - $response = $this->nullResponse(); + } else { $this->redirectToRoute('admin.module'); } diff --git a/templates/admin/default/includes/module-block.html b/templates/admin/default/includes/module-block.html index 2b45f5bc3..dd499393f 100644 --- a/templates/admin/default/includes/module-block.html +++ b/templates/admin/default/includes/module-block.html @@ -22,14 +22,14 @@