Skip to content

Instantly share code, notes, and snippets.

@sheise
Created April 10, 2017 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sheise/7d27a8a545927b62101dede04c686790 to your computer and use it in GitHub Desktop.
Save sheise/7d27a8a545927b62101dede04c686790 to your computer and use it in GitHub Desktop.
diff --git a/docroot/modules/contrib/field_collection/src/FieldCollectionItemAccessControlHandler.php b/docroot/modules/contrib/field_collection/src/FieldCollectionItemAccessControlHandler.php
index 4c79e3d..41339d8 100644
--- a/docroot/modules/contrib/field_collection/src/FieldCollectionItemAccessControlHandler.php
+++ b/docroot/modules/contrib/field_collection/src/FieldCollectionItemAccessControlHandler.php
@@ -23,9 +23,13 @@ protected function checkAccess(EntityInterface $entity, $operation, AccountInter
}
// Here we will be if host entity was not set and entity is not new.
elseif (!$entity->isNew()) {
+ // Applications that were migrated throw errors on first save though
+ // the ui. This is a temporary work around for that.
+ /**
throw new \RuntimeException($this->t('Host entity for field collection item (@id) was not set.', [
'@id' => $entity->id(),
]));
+ */
}
}
Bypass error when saving migrated application.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment