Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / system / src / SystemConfigSubscriber.php
index 519155b8497c9e92a29e2aa3d85b6f867abc540a..0ab0d15fc6105dd9725adfadf09edf2d36daf14f 100644 (file)
@@ -72,6 +72,9 @@ class SystemConfigSubscriber implements EventSubscriberInterface {
    *   The config import event.
    */
   public function onConfigImporterValidateSiteUUID(ConfigImporterEvent $event) {
+    if (!$event->getConfigImporter()->getStorageComparer()->getSourceStorage()->exists('system.site')) {
+      $event->getConfigImporter()->logError($this->t('This import does not contain system.site configuration, so has been rejected.'));
+    }
     if (!$event->getConfigImporter()->getStorageComparer()->validateSiteUuid()) {
       $event->getConfigImporter()->logError($this->t('Site UUID in source storage does not match the target storage.'));
     }