I written the custom plugin extend GroupContentEnablerBase. It was work for me. But when I updated the group to last version. And goto /admin/group/types/manage/{group type}/permissions . The website is broken.

See documentation:
Custom entities as group content

It’s easy to develop for...

See the developer experience:
https://www.drupal.org/project/group/issues/2810131#comment-12364263

After this commit,
https://www.drupal.org/project/group/issues/2702735#comment-12353860
the CustomPluginDeriver.php need update like follow.

copy from gnode,http://cgit.drupalcode.org/group/diff/modules/gnode/src/Plugin/GroupCont... :

diff --git a/modules/gnode/src/Plugin/GroupContentEnabler/GroupNodeDeriver.php b/modules/gnode/src/Plugin/GroupContentEnabler/GroupNodeDeriver.php
index 744d235..ecc1a91 100644
--- a/modules/gnode/src/Plugin/GroupContentEnabler/GroupNodeDeriver.php
+++ b/modules/gnode/src/Plugin/GroupContentEnabler/GroupNodeDeriver.php
@@ -16,7 +16,7 @@ class GroupNodeDeriver extends DeriverBase {
 
       $this->derivatives[$name] = [
         'entity_bundle' => $name,
-        'label' => t('Group node') . " ($label)",
+        'label' => t('Group node (@type)', ['@type' => $label]),
         'description' => t('Adds %type content to groups both publicly and privately.', ['%type' => $label]),
       ] + $base_plugin_definition;
     }
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dravenk created an issue. See original summary.

dravenk’s picture

This error happen after this commit :

commit 517b55739044413982eaefec88ce2db867619814
Author: Kristiaan Van den Eynde <magentix@gmail.com>
Date:   Wed Nov 22 15:16:57 2017 +0100

    Issue #2702735 by kristiaanvandeneynde: UX - Group node: Clean up permission names

Please reviews.

dravenk’s picture

Add related issue and replenish error message:

The website encountered an unexpected error. Please try again later.
Error: Call to a member function __toString() on string in Drupal\group\Access\GroupPermissionHandler->getPermissionsByGroupType() (line 147 of modules/contrib/group/src/Access/GroupPermissionHandler.php).
Drupal\group\Access\GroupPermissionHandler->getPermissionsByGroupType(Object) (Line: 105)
Drupal\group\Form\GroupPermissionsForm->getPermissions() (Line: 172)
Drupal\group\Form\GroupPermissionsForm->buildForm(Array, Object) (Line: 112)
Drupal\group\Form\GroupPermissionsTypeSpecificForm->buildForm(Array, Object, Object)
call_user_func_array(Array, Array) (Line: 514)
Drupal\Core\Form\FormBuilder->retrieveForm('group_admin_permissions', Object) (Line: 271)
Drupal\Core\Form\FormBuilder->buildForm('group_admin_permissions', Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 576)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 153)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 38)
Drupal\jsonapi\StackMiddleware\FormatSetter->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 657)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

dravenk’s picture

Issue summary: View changes
dravenk’s picture

Issue summary: View changes
dravenk’s picture

Issue summary: View changes
lawxen’s picture

Status: Needs review » Needs work

2928190-2.patch looks wrong. It's a tricky patch, Not solve the root problem.

lawxen’s picture

Status: Needs work » Closed (cannot reproduce)

I test that, this is not a bug!

lawxen’s picture

This is a change of group, custom group content needs to be updated too,
see https://www.drupal.org/node/2702735

skyredwang’s picture

Status: Closed (cannot reproduce) » Closed (works as designed)
dravenk’s picture

Priority: Major » Normal
Status: Closed (works as designed) » Needs review
FileSize
964 bytes

I think updates should not be a reason to break old functionality. Because this feature used to be good. If so, should have a way to tell the developer this update.

dravenk’s picture

Issue summary: View changes
skyredwang’s picture

Status: Needs review » Closed (works as designed)

According to #9, this is work as designed.