diff -u b/relaxed.module b/relaxed.module --- b/relaxed.module +++ b/relaxed.module @@ -211,16 +211,15 @@ * Implements hook_form_FORM_ID_alter(). */ function relaxed_form_workspace_basic_edit_form_alter(&$form, FormStateInterface $form_state, $form_id) { - foreach ($form['upstream']['widget']['#options'] as $option) { - if (is_string($option) && substr($option, -1) == '*') { - $form['upstream']['widget']['#suffix'] = '
* ' . - t('One or more options for selecting the target ' . - 'workspace is/are disabled because the remote workspace could not ' . - 'be accessed during the last availability check, this can happen ' . - 'because of different reasons, for example network connection ' . - 'issues. The availability of the remote workspace is checked on ' . - 'every cron run and if it becomes available, the option to select ' . - 'the workspace is activated again.') . '
'; + foreach ($form['upstream']['widget']['#options'] as $key => $option) { + if (!empty($form['upstream']['widget'][$key]['#disabled'])) { + $form['message']['#message_list']['warning'][] = t('One or more options for selecting the target ' . + 'workspace is/are disabled because the remote workspace could not ' . + 'be accessed during the last availability check, this can happen ' . + 'because of different reasons, for example network connection ' . + 'issues. The availability of the remote workspace is checked on ' . + 'every cron run and if it becomes available, the option to select ' . + 'the workspace is activated again.'); return; } } diff -u b/src/CouchdbReplicator.php b/src/CouchdbReplicator.php --- b/src/CouchdbReplicator.php +++ b/src/CouchdbReplicator.php @@ -117,9 +117,13 @@ $this->dispatchReplicationFinishedEvent($source, $target, $log); return $log; } + // In case of PeerNotReachableException just throw again the exception, + // this will allow to keep the replication in the queue and not fail it. + // @see Drupal\workspace\Plugin\QueueWorker\WorkspaceReplication::processItem(). catch (PeerNotReachableException $e) { throw $e; } + // All other exceptions will make replication to fail. catch (\Exception $e) { watchdog_exception('Relaxed', $e); $log = $this->errorReplicationLog($source, $target, $task);