From 9ec168941029fd5a37e5ead3ae18b78bff9d2963 Mon Sep 17 00:00:00 2001 From: florenttorregrosa Date: Tue, 7 Feb 2017 16:52:22 +0100 Subject: [PATCH] Issue #2849487 by Grimreaper: Check if workspaces are available --- src/Form/IndividualPullForm.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Form/IndividualPullForm.php b/src/Form/IndividualPullForm.php index 7c1b244..8842b81 100644 --- a/src/Form/IndividualPullForm.php +++ b/src/Form/IndividualPullForm.php @@ -109,6 +109,12 @@ class IndividualPullForm extends FormBase { return []; } + if (!$this->replicatorManager->targetWorkspaceAvailable($source, $target)) { + $message = $this->t('One or more problems were detected with the target workspace. Check the status report for more information.', [':status' => URL::fromRoute('system.status')->toString()]); + drupal_set_message($message, 'error'); + return []; + } + $form['source'] = array( '#type' => 'hidden', '#value' => $source->id(), -- 1.9.1