From 5caef27577a930c028576caf7c1c7791ea5eeefa Mon Sep 17 00:00:00 2001 From: Loz Calver Date: Wed, 5 Jul 2017 10:29:56 +0100 Subject: [PATCH] Add archive to list of validation-exempt actions --- code/controllers/CMSMain.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php index 9f307bd9..c09d37e2 100644 --- a/code/controllers/CMSMain.php +++ b/code/controllers/CMSMain.php @@ -678,7 +678,16 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr // if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet'); $form->setAttribute('data-pjax-fragment', 'CurrentForm'); // Set validation exemptions for specific actions - $form->setValidationExemptActions(array('restore', 'revert', 'deletefromlive', 'delete', 'unpublish', 'rollback', 'doRollback')); + $form->setValidationExemptActions(array( + 'restore', + 'revert', + 'deletefromlive', + 'delete', + 'unpublish', + 'rollback', + 'doRollback', + 'archive' + )); // Announce the capability so the frontend can decide whether to allow preview or not. if(in_array('CMSPreviewable', class_implements($record))) {