From 66bfff4d150ce5a6544ff5a21c2644c1469a1761 Mon Sep 17 00:00:00 2001 From: Loz Calver Date: Thu, 3 Oct 2013 11:25:05 +0100 Subject: [PATCH] FIX Don't validate pages when restoring or reverting (fixes #2449) Use new method --- code/controllers/CMSMain.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php index 290da5fd..237464ff 100644 --- a/code/controllers/CMSMain.php +++ b/code/controllers/CMSMain.php @@ -634,6 +634,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr $form->addExtraClass('center ' . $this->BaseCSSClasses()); // 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', 'rollback')); // Announce the capability so the frontend can decide whether to allow preview or not. if(in_array('CMSPreviewable', class_implements($record))) {