FieldException: Attempt to create a field without a field_name

Created on 3 October 2023, about 1 year ago

Problem/Motivation

I've WSOD error after adding the group.

Steps to reproduce

I've installed Group module and related (group+field_group+field_permissions_group), but got this error after creating the first group at /admin/group/types/add:

The website encountered an unexpected error. Please try again later.

Drupal\Core\Field\FieldException: Attempt to create a field without a field_name. in Drupal\field\Entity\FieldConfig->__construct() (line 113 of core/modules/field/src/Entity/FieldConfig.php).
Drupal\Core\Config\Entity\ConfigEntityStorage->doCreate(Array) (Line: 266)
Drupal\Core\Entity\EntityStorageBase->create(Array) (Line: 79)
Drupal\group\Plugin\Group\RelationHandler\GroupMembershipPostInstall->installGroupRolesField(Object, )
call_user_func_array(Array, Array) (Line: 205)
Drupal\group\Entity\GroupRelationshipType->postSave(Object, ) (Line: 597)
Drupal\Core\Entity\EntityStorageBase->doPostSave(Object, ) (Line: 523)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 253)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 608)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 346)
Drupal\group\Plugin\Group\Relation\GroupRelationTypeManager->installEnforced(Object) (Line: 238)
Drupal\group\Entity\GroupType->postSave(Object, ) (Line: 597)
Drupal\Core\Entity\EntityStorageBase->doPostSave(Object, ) (Line: 523)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 253)
Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 608)
Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 287)
Drupal\group\Entity\Form\GroupTypeForm->save(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 592)
Drupal\Core\Form\FormBuilder->processForm('group_type_add_form', Array, Object) (Line: 320)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
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}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 707)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
πŸ› Bug report
Status

Active

Version

3.2

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom kenorb

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kenorb
  • πŸ‡¬πŸ‡§United Kingdom kenorb
  • I had this problem after upgrading from v2 to v3, but not when installing v2 fresh.
    This and another problem with views, made me realise that quite a bit of upgrade code is needed to compensate for the change of entity name from group_content to group_relationship.

  • πŸ‡ΊπŸ‡ΈUnited States pcate

    I've also ran into this issue when trying to upgrade from v2.3 to v3.3. I can also confirm that upgrading from v2.2.2 to v3.3 does not run into this error.

  • πŸ‡©πŸ‡ͺGermany dbielke1986

    I've also ran into this issue when trying to upgrade from v2.3 to v3.3.

  • πŸ‡³πŸ‡ΏNew Zealand jlscott

    I have just run into this issue when trying to upgrade my site from Group 2 to Group. I have group 2.3.0 going to group 3.3.0 (along with subgroup from 2.0.2 to 3.0.2 and ginvite from 3.0.0-rc3 to 4.0.0-rc3).

Production build 0.71.5 2024