diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php index c09d37e2..9e7aa924 100644 --- a/code/controllers/CMSMain.php +++ b/code/controllers/CMSMain.php @@ -1186,7 +1186,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr $id = (isset($data['ID'])) ? (int) $data['ID'] : null; $version = (isset($data['Version'])) ? (int) $data['Version'] : null; - $record = DataObject::get_by_id($this->stat('tree_class'), $id); + $record = Versioned::get_latest_version($this->stat('tree_class'), $id); if($record && !$record->canEdit()) return Security::permissionFailure($this); if($version) { diff --git a/javascript/CMSMain.EditForm.js b/javascript/CMSMain.EditForm.js index 3d92f5f3..79925ff0 100644 --- a/javascript/CMSMain.EditForm.js +++ b/javascript/CMSMain.EditForm.js @@ -254,8 +254,7 @@ * * A "rollback" to a specific version needs user confirmation. */ - $('.cms-edit-form .Actions #Form_EditForm_action_rollback').entwine({ - + $('.cms-edit-form .Actions #Form_EditForm_action_doRollback').entwine({ /** * Function: onclick *