Skip to content

Commit 5c50dbe

Browse files
committed
Skip the exception on invalid definition.
1 parent 90a4a52 commit 5c50dbe

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

patches/group_relation_type_entity_type_definitions_during_cache_rebuild.patch

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
diff --git a/src/Plugin/Group/Relation/GroupRelationTypeManager.php b/src/Plugin/Group/Relation/GroupRelationTypeManager.php
2-
index 4a405ea..d3f0f07 100644
2+
index 4a405ea..982bbcd 100644
33
--- a/src/Plugin/Group/Relation/GroupRelationTypeManager.php
44
+++ b/src/Plugin/Group/Relation/GroupRelationTypeManager.php
5+
@@ -129,7 +129,7 @@ class GroupRelationTypeManager extends DefaultPluginManager implements GroupRela
6+
throw new InvalidPluginDefinitionException($plugin_id, sprintf('The "%s" plugin defines entity access over group entities. This should be dealt with by altering the group permissions of the current user.', $plugin_id));
7+
}
8+
9+
- if ($this->entityTypeManager->getDefinition($entity_type_id)->entityClassImplements(ConfigEntityInterface::class)) {
10+
+ if ($this->entityTypeManager->getDefinition($entity_type_id, FALSE)->entityClassImplements(ConfigEntityInterface::class)) {
11+
$definition->set('config_entity_type', TRUE);
12+
}
13+
}
514
@@ -315,8 +315,15 @@ class GroupRelationTypeManager extends DefaultPluginManager implements GroupRela
615
public function installEnforced(?GroupTypeInterface $group_type = NULL) {
716
$enforced = [];
8-
17+
918
- // Gather the ID of all plugins that are marked as enforced.
1019
- foreach ($this->getDefinitions() as $plugin_id => $group_relation_type) {
1120
+ try {

0 commit comments

Comments
 (0)