Skip to content

Commit

Permalink
Fix front-end submissions throwing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Jan 18, 2020
1 parent c626f4c commit 0e23b1d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/services/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,8 @@ public function handleSiteRequest($event, $action)
// When we're saving a brand new entry for submission, we need to create a new draft
// and work with that, as opposed to the original entry.
if ($action == 'save-submission') {
// Craft::dump('test');
$draft = Craft::$app->getDrafts()->createDraft($event->sender, Craft::$app->getUser()->getId());

// // Perform the Workflow submission on this new draft
Workflow::$plugin->getSubmissions()->saveSubmission($draft);
// Perform the Workflow submission on this new entry
Workflow::$plugin->getSubmissions()->saveSubmission($event->sender);
}
}

Expand Down

0 comments on commit 0e23b1d

Please sign in to comment.