Errors upgrading from 1.5 -> 2.1 (with config entities)

Created on 14 August 2023, over 1 year ago
Updated 17 June 2024, 5 months ago

Problem/Motivation

I'm hoping someone can help me interpret these error messages. We've been using Group 1.5 for quite a while, and I've added in the patch that allows Group to support config entities, and we've been using the groupmenu module to allow groups to manage their own menu items. Now, I'm hoping to find an upgrade path that doesn't involve deleting the group module and recreating all of the groups. I'm fine with removing all the menu relationships, and I've done that.

I have uninstalled the config entity patch, removed all menu relationships for Groups, and uninstalled the GroupMenu module in my development environment. Now, I've upgraded to Group 2.1, but when I attempt to run database updates, I see these errors:

-------- ----------- --------------- ----------------------------------------------------------------------------------- 
  Module   Update ID   Type            Description                                                                        
 -------- ----------- --------------- ----------------------------------------------------------------------------------- 
  group    9203        hook_update_n   9203 - Update group_content DB table, fields and indexes.                          
  group    9204        hook_update_n   9204 - Remove the 'bypass group access' permission from all roles.                 
  group    9205        hook_update_n   9205 - Convert group roles with the 'administer group' permission to admin roles.  
  group    9206        hook_update_n   9206 - Convert synchronized group roles to new scope and target_role structure.    
  group    9207        hook_update_n   9207 - Convert default group roles to new scope and target_role structure.         
  group    9208        hook_update_n   9208 - Convert user created group roles to new scope and target_role structure.    
  group    9209        hook_update_n   9209 - Remove label and description from relationship types.                       
  group    9210        hook_update_n   9210 - Introduce the group_config_wrapper entity type.                             
 -------- ----------- --------------- ----------------------------------------------------------------------------------- 


 Do you wish to run the specified pending updates? (yes/no) [yes]:
 > yes

>  [notice] Update started: group_update_9203
>  [error]  Drupal\Core\Entity\Sql\DefaultTableMapping::Drupal\Core\Entity\Sql\{closure}(): Argument #1 ($definition) must be of type Drupal\Core\Field\FieldStorageDefinitionInterface, __PHP_Incomplete_Class given 
>  [error]  Update failed: group_update_9203 
> [2023-08-14T19:34:56.337288+00:00] php.ERROR: TypeError: Drupal\Core\Entity\Sql\DefaultTableMapping::Drupal\Core\Entity\Sql\{closure}(): Argument #1 ($definition) must be of type Drupal\Core\Field\FieldStorageDefinitionInterface, __PHP_Incomplete_Class given in Drupal\Core\Entity\Sql\DefaultTableMapping::Drupal\Core\Entity\Sql\{closure}() (line 175 of /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php) #0 [internal function]: Drupal\Core\Entity\Sql\DefaultTableMapping::Drupal\Core\Entity\Sql\{closure}(Object(__PHP_Incomplete_Class)) #1 /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php(177): array_filter(Array, Object(Closure)) #2 /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(381): Drupal\Core\Entity\Sql\DefaultTableMapping::create(Object(Drupal\Core\Entity\ContentEntityType), Array, '') #3 /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(356): Drupal\Core\Entity\Sql\SqlContentEntityStorage->getCustomTableMapping(Object(Drupal\Core\Entity\ContentEntityType), Array) #4 /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(203): Drupal\Core\Entity\Sql\SqlContentEntityStorage->getTableMapping() #5 /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(188): Drupal\Core\Entity\Sql\SqlContentEntityStorage->initTableLayout() #6 /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(156): Drupal\Core\Entity\Sql\SqlContentEntityStorage->__construct(Object(Drupal\Core\Entity\ContentEntityType), Object(Drupal\mysql\Driver\Database\mysql\Connection), Object(Drupal\Core\Entity\EntityFieldManager), Object(Drupal\Core\Update\UpdateBackend), Object(Drupal\language\ConfigurableLanguageManager), Object(Drupal\Core\Cache\MemoryCache\MemoryCache), Object(Drupal\Core\Entity\EntityTypeBundleInfo), Object(Drupal\Core\Entity\EntityTypeManager)) #7 /var/www/html/docroot/modules/contrib/group/src/Entity/Storage/GroupRelationshipStorage.php(61): Drupal\Core\Entity\Sql\SqlContentEntityStorage::createInstance(Object(Drupal\Core\DependencyInjection\ContainerBuilder), Object(Drupal\Core\Entity\ContentEntityType)) #8 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(269): Drupal\group\Entity\Storage\GroupRelationshipStorage::createInstance(Object(Drupal\Core\DependencyInjection\ContainerBuilder), Object(Drupal\Core\Entity\ContentEntityType)) #9 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(258): Drupal\Core\Entity\EntityTypeManager->createHandlerInstance('Drupal\\group\\En...', Object(Drupal\Core\Entity\ContentEntityType)) #10 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(192): Drupal\Core\Entity\EntityTypeManager->getHandler('group_content', 'storage') #11 /var/www/html/docroot/core/modules/views/src/EntityViewsData.php(107): Drupal\Core\Entity\EntityTypeManager->getStorage('group_content') #12 /var/www/html/docroot/modules/contrib/group/src/Entity/Views/GroupRelationshipViewsData.php(26): Drupal\views\EntityViewsData::createInstance(Object(Drupal\Core\DependencyInjection\ContainerBuilder), Object(Drupal\Core\Entity\ContentEntityType)) #13 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(269): Drupal\group\Entity\Views\GroupRelationshipViewsData::createInstance(Object(Drupal\Core\DependencyInjection\ContainerBuilder), Object(Drupal\Core\Entity\ContentEntityType)) #14 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(258): Drupal\Core\Entity\EntityTypeManager->createHandlerInstance('Drupal\\group\\En...', Object(Drupal\Core\Entity\ContentEntityType)) #15 /var/www/html/docroot/core/modules/views/views.views.inc(179): Drupal\Core\Entity\EntityTypeManager->getHandler('group_content', 'views_data') #16 /var/www/html/docroot/core/modules/views/src/ViewsData.php(236): views_views_data() #17 /var/www/html/docroot/core/lib/Drupal/Core/Extension/ModuleHandler.php(405): Drupal\views\ViewsData->Drupal\views\{closure}(Object(Closure), 'views') #18 /var/www/html/docroot/core/modules/views/src/ViewsData.php(244): Drupal\Core\Extension\ModuleHandler->invokeAllWith('views_data', Object(Closure)) #19 /var/www/html/docroot/core/modules/views/src/ViewsData.php(154): Drupal\views\ViewsData->getData() #20 /var/www/html/docroot/core/modules/views/src/Plugin/Derivative/ViewsEntityRow.php(94): Drupal\views\ViewsData->get('aggregator_feed') #21 /var/www/html/docroot/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101): Drupal\views\Plugin\Derivative\ViewsEntityRow->getDerivativeDefinitions(Array) #22 /var/www/html/docroot/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) #23 /var/www/html/docroot/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(291): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() #24 /var/www/html/docroot/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(181): Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() #25 /var/www/html/docroot/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(22): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() #26 /var/www/html/docroot/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(16): Drupal\Core\Plugin\DefaultPluginManager->getDefinition('data_field') #27 /var/www/html/docroot/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(83): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('data_field', Array) #28 /var/www/html/docroot/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(816): Drupal\Component\Plugin\PluginManagerBase->createInstance('data_field') #29 /var/www/html/docroot/core/modules/views/src/Plugin/views/style/StylePluginBase.php(122): Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('row') #30 /var/www/html/docroot/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(819): Drupal\views\Plugin\views\style\StylePluginBase->init(Object(Drupal\views\ViewExecutable), Object(Drupal\rest\Plugin\views\display\RestExport), Array) #31 /var/www/html/docroot/core/modules/rest/src/Plugin/views/display/RestExport.php(346): Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('style') #32 /var/www/html/docroot/core/modules/views/src/EventSubscriber/RouteSubscriber.php(120): Drupal\rest\Plugin\views\display\RestExport->collectRoutes(Object(Symfony\Component\Routing\RouteCollection)) #33 [internal function]: Drupal\views\EventSubscriber\RouteSubscriber->routes() #34 /var/www/html/docroot/core/lib/Drupal/Core/Routing/RouteBuilder.php(146): call_user_func(Array) #35 /var/www/html/docroot/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild() #36 /var/www/html/docroot/core/includes/common.inc(587): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild() #37 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(391): drupal_flush_all_caches() #38 /var/www/html/vendor/drush/drush/includes/batch.inc(352): Drush\Commands\core\UpdateDBCommands->updateFinished(true, Array, Array, Object(Drupal\Core\StringTranslation\TranslatableMarkup)) #39 /var/www/html/vendor/drush/drush/includes/batch.inc(207): _drush_batch_finished() #40 /var/www/html/vendor/drush/drush/includes/batch.inc(100): _drush_batch_command('11221') #41 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(175): drush_batch_command('11221') #42 [internal function]: Drush\Commands\core\UpdateDBCommands->process('11221', Array) #43 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array) #44 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData)) #45 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData)) #46 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData)) #47 /var/www/html/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #48 /var/www/html/vendor/symfony/console/Application.php(1039): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #49 /var/www/html/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #50 /var/www/html/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #51 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #52 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(48): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput)) #53 /var/www/html/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array) #54 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...') #55 /var/www/html/vendor/bin/drush(107): include('/var/www/html/v...') #56 {main}. {"exception":"[object] (TypeError(code: 0): Drupal\\Core\\Entity\\Sql\\DefaultTableMapping::Drupal\\Core\\Entity\\Sql\\{closure}(): Argument #1 ($definition) must be of type Drupal\\Core\\Field\\FieldStorageDefinitionInterface, __PHP_Incomplete_Class given at /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php:175)","severity_level":3} {"referer":"","ip":"127.0.0.1","request_uri":"http://sites.rhodes.ddev.site/","uid":0,"user":""}
> TypeError: Drupal\Core\Entity\Sql\DefaultTableMapping::Drupal\Core\Entity\Sql\{closure}(): Argument #1 ($definition) must be of type Drupal\Core\Field\FieldStorageDefinitionInterface, __PHP_Incomplete_Class given in /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php on line 175 #0 [internal function]: Drupal\Core\Entity\Sql\DefaultTableMapping::Drupal\Core\Entity\Sql\{closure}(Object(__PHP_Incomplete_Class))
> #1 /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php(177): array_filter(Array, Object(Closure))
> #2 /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(381): Drupal\Core\Entity\Sql\DefaultTableMapping::create(Object(Drupal\Core\Entity\ContentEntityType), Array, '')
> #3 /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(356): Drupal\Core\Entity\Sql\SqlContentEntityStorage->getCustomTableMapping(Object(Drupal\Core\Entity\ContentEntityType), Array)
> #4 /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(203): Drupal\Core\Entity\Sql\SqlContentEntityStorage->getTableMapping()
> #5 /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(188): Drupal\Core\Entity\Sql\SqlContentEntityStorage->initTableLayout()
> #6 /var/www/html/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(156): Drupal\Core\Entity\Sql\SqlContentEntityStorage->__construct(Object(Drupal\Core\Entity\ContentEntityType), Object(Drupal\mysql\Driver\Database\mysql\Connection), Object(Drupal\Core\Entity\EntityFieldManager), Object(Drupal\Core\Update\UpdateBackend), Object(Drupal\language\ConfigurableLanguageManager), Object(Drupal\Core\Cache\MemoryCache\MemoryCache), Object(Drupal\Core\Entity\EntityTypeBundleInfo), Object(Drupal\Core\Entity\EntityTypeManager))
> #7 /var/www/html/docroot/modules/contrib/group/src/Entity/Storage/GroupRelationshipStorage.php(61): Drupal\Core\Entity\Sql\SqlContentEntityStorage::createInstance(Object(Drupal\Core\DependencyInjection\ContainerBuilder), Object(Drupal\Core\Entity\ContentEntityType))
> #8 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(269): Drupal\group\Entity\Storage\GroupRelationshipStorage::createInstance(Object(Drupal\Core\DependencyInjection\ContainerBuilder), Object(Drupal\Core\Entity\ContentEntityType))
> #9 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(258): Drupal\Core\Entity\EntityTypeManager->createHandlerInstance('Drupal\\group\\En...', Object(Drupal\Core\Entity\ContentEntityType))
> #10 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(192): Drupal\Core\Entity\EntityTypeManager->getHandler('group_content', 'storage')
> #11 /var/www/html/docroot/core/modules/views/src/EntityViewsData.php(107): Drupal\Core\Entity\EntityTypeManager->getStorage('group_content')
> #12 /var/www/html/docroot/modules/contrib/group/src/Entity/Views/GroupRelationshipViewsData.php(26): Drupal\views\EntityViewsData::createInstance(Object(Drupal\Core\DependencyInjection\ContainerBuilder), Object(Drupal\Core\Entity\ContentEntityType))
> #13 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(269): Drupal\group\Entity\Views\GroupRelationshipViewsData::createInstance(Object(Drupal\Core\DependencyInjection\ContainerBuilder), Object(Drupal\Core\Entity\ContentEntityType))
> #14 /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php(258): Drupal\Core\Entity\EntityTypeManager->createHandlerInstance('Drupal\\group\\En...', Object(Drupal\Core\Entity\ContentEntityType))
> #15 /var/www/html/docroot/core/modules/views/views.views.inc(179): Drupal\Core\Entity\EntityTypeManager->getHandler('group_content', 'views_data')
> #16 /var/www/html/docroot/core/modules/views/src/ViewsData.php(236): views_views_data()
> #17 /var/www/html/docroot/core/lib/Drupal/Core/Extension/ModuleHandler.php(405): Drupal\views\ViewsData->Drupal\views\{closure}(Object(Closure), 'views')
> #18 /var/www/html/docroot/core/modules/views/src/ViewsData.php(244): Drupal\Core\Extension\ModuleHandler->invokeAllWith('views_data', Object(Closure))
> #19 /var/www/html/docroot/core/modules/views/src/ViewsData.php(154): Drupal\views\ViewsData->getData()
> #20 /var/www/html/docroot/core/modules/views/src/Plugin/Derivative/ViewsEntityRow.php(94): Drupal\views\ViewsData->get('aggregator_feed')
> #21 /var/www/html/docroot/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101): Drupal\views\Plugin\Derivative\ViewsEntityRow->getDerivativeDefinitions(Array)
> #22 /var/www/html/docroot/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array)
> #23 /var/www/html/docroot/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(291): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
> #24 /var/www/html/docroot/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(181): Drupal\Core\Plugin\DefaultPluginManager->findDefinitions()
> #25 /var/www/html/docroot/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(22): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
> #26 /var/www/html/docroot/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(16): Drupal\Core\Plugin\DefaultPluginManager->getDefinition('data_field')
> #27 /var/www/html/docroot/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(83): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('data_field', Array)
> #28 /var/www/html/docroot/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(816): Drupal\Component\Plugin\PluginManagerBase->createInstance('data_field')
> #29 /var/www/html/docroot/core/modules/views/src/Plugin/views/style/StylePluginBase.php(122): Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('row')
> #30 /var/www/html/docroot/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(819): Drupal\views\Plugin\views\style\StylePluginBase->init(Object(Drupal\views\ViewExecutable), Object(Drupal\rest\Plugin\views\display\RestExport), Array)
> #31 /var/www/html/docroot/core/modules/rest/src/Plugin/views/display/RestExport.php(346): Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('style')
> #32 /var/www/html/docroot/core/modules/views/src/EventSubscriber/RouteSubscriber.php(120): Drupal\rest\Plugin\views\display\RestExport->collectRoutes(Object(Symfony\Component\Routing\RouteCollection))
> #33 [internal function]: Drupal\views\EventSubscriber\RouteSubscriber->routes()
> #34 /var/www/html/docroot/core/lib/Drupal/Core/Routing/RouteBuilder.php(146): call_user_func(Array)
> #35 /var/www/html/docroot/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild()
> #36 /var/www/html/docroot/core/includes/common.inc(587): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild()
> #37 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(391): drupal_flush_all_caches()
> #38 /var/www/html/vendor/drush/drush/includes/batch.inc(352): Drush\Commands\core\UpdateDBCommands->updateFinished(true, Array, Array, Object(Drupal\Core\StringTranslation\TranslatableMarkup))
> #39 /var/www/html/vendor/drush/drush/includes/batch.inc(207): _drush_batch_finished()
> #40 /var/www/html/vendor/drush/drush/includes/batch.inc(100): _drush_batch_command('11221')
> #41 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(175): drush_batch_command('11221')
> #42 [internal function]: Drush\Commands\core\UpdateDBCommands->process('11221', Array)
> #43 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
> #44 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #45 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #46 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #47 /var/www/html/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #48 /var/www/html/vendor/symfony/console/Application.php(1039): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #49 /var/www/html/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #50 /var/www/html/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #51 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #52 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(48): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
> #53 /var/www/html/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
> #54 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
> #55 /var/www/html/vendor/bin/drush(107): include('/var/www/html/v...')
> #56 {main}
>  [warning] Drush command terminated abnormally.

In ProcessBase.php line 171:
                                                                                                                                                                    
  Unable to decode output into JSON: Syntax error                                                                                                                   
                                                                                                                                                                    
  TypeError: Drupal\Core\Entity\Sql\DefaultTableMapping::Drupal\Core\Entity\Sql\{closure}(): Argument #1 ($definition) must be of type Drupal\Core\Field\FieldStor  
  ageDefinitionInterface, __PHP_Incomplete_Class given in Drupal\Core\Entity\Sql\DefaultTableMapping::Drupal\Core\Entity\Sql\{closure}() (line 175 of /var/www/htm  
  l/docroot/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php).
πŸ’¬ Support request
Status

Active

Version

1.5

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States safetypin Memphis, Tennessee

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

Comments & Activities

  • Issue created by @safetypin
  • πŸ‡¬πŸ‡§United Kingdom sam.foster

    Hi there

    I have a problem very similar to this and also use the groups module in a complex build. Did you get any pointers on what this error might be and how to fix it. I'm real stumped right now!

    Thanks

    Sam

  • πŸ‡ΊπŸ‡ΈUnited States safetypin Memphis, Tennessee

    I'm pretty sure this is due to an entry in the key_value table that should have been deleted.

    Try executing SELECT * FROM key_value WHERE name='group_content.field_storage_definitions'; and see if it returns any records. If it does, you should manually remove that row. (test it first in a development environment to be extra careful.

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

    For me the problem is in the key_value in the collection named: "file.field_storage_definitions" -- because of the use of Group Taxonomy (in one case, even where it was no longer enabled). Group taxonomy added storage definitions for entity_id and entity_id_str but they are done using a class that is of the right instance for Drupal10's purposes.

    I'm still at a loss at how to fix it right now. There has been some work around it, but the patch does not seem to be working from me.
    https://www.drupal.org/project/group_taxonomy/issues/3331610 πŸ“Œ Support Group 2.x Needs review

    Sam or safety_pin did you ever find your way around it?
    Deleting the keyvalue did not work for me. Nor did deleting the specific items within the value. Not really a viable approach for production in any case.

  • Status changed to Postponed: needs info 10 months ago
  • πŸ‡§πŸ‡ͺBelgium kristiaanvandeneynde Antwerp, Belgium

    Could any of you please answer the questions in:

    Please read this carefully before posting

    I am missing steps to reproduce on a clean install, whether you used any invasive patches, ...

  • πŸ‡ΊπŸ‡ΈUnited States safetypin Memphis, Tennessee

    @kristiaanvandeneynde - I doubt very much that this issue could be replicated with a clean install; in the original description I stated that I had used several patches from ✨ Entities identified by strings as group content Closed: won't fix . I guess I can't speak for the others who have commented here, but I personally don't have any expectation of support from you for this issue because I used those patches. I'm really grateful for the work you've done to maintain and improve this module. I think we're still missing support for core config entities (menus), from what I've read about your work to support that, there's a lot of core mess that will need to be cleaned up before that's possible. But, I'm thankfully in a situation where it's not strictly necessary for our groups to have access to the menu system.

    @adriancotter - If I remember correctly, I resolved this issue using some sql in a custom module to move some data around from the "support config entities" patch:

    function custom_module_fix_group_db_install() {
      $database = \Drupal::database();
    
      // We need to re-add the entity_id column to group_content_field_data.
      // Get data from the table that the patch added ('group_content__entity_id').
      $database->query("ALTER TABLE group_content_field_data ADD entity_id INT(11);");
      $database->query("
        UPDATE group_content_field_data
        JOIN group_content__entity_id ON group_content_field_data.id = group_content__entity_id.entity_id
        SET group_content_field_data.entity_id = group_content__entity_id.entity_id_target_id;
      ");
    
      // Now, we can remove all the messed up config, from the old field.
      $database->query("DELETE FROM key_value WHERE name='group_content.field_schema_data.entity_id_str';");
      $database->query("DROP TABLE group_content__entity_id_str;");
      $database->query("DELETE FROM key_value WHERE name='group_content.field_storage_definitions';");
    }
    
    
  • πŸ‡ΊπŸ‡ΈUnited States adriancotter

    I was using Group Taxonomy and the string id patch (#2797793) which has been my main source of issues. I also had group_menu and a custom module. So I am not sure I can give an easy answer to reproducing.

    I have walked a lot of that back with this patch on group taxonomy below and have things mostly working (the remaining issues I think are mostly about additional customization of my own around group taxonomy and paragraphs, and other modules like quick node clone, etc). I was able to update the site most importantly.
    https://www.drupal.org/project/group_taxonomy/issues/3331610 πŸ“Œ Support Group 2.x Needs review

  • Status changed to Active 10 months ago
  • πŸ‡§πŸ‡ͺBelgium kristiaanvandeneynde Antwerp, Belgium

    @safetypin Okay thanks for the clarification, I was seeing a few similar issues like these and none of them had any clear information for me to work with. But if the goal is for those in the same boat to be able to help each other out, then I'm fully onboard with keeping this issue open.

  • πŸ‡¨πŸ‡·Costa Rica tatewaky

    i am on the same boat as @safetypin , however have been unable to fix with that solution, still working to see i can make it , but in the mean time if someone have a patch or a clear solution would be nice to hear

  • Same problem when going from 1.6 to 2.2.2

  • πŸ‡ΈπŸ‡ͺSweden Kevin N

    I had the same issue when upgrading from 1.x to 2.2.2.

    Note that the site only used this patch menus, so you might need to tweaks som stuff.
    And as always, try this on a dev environment first.

    It was solved with the following steps:

    1. First run the function below to:
      1. Create a temporary table to store the menus (group content), (only content need to recreate them is stored).
      2. Temporarily store the menus (group content) in a new table
      3. Remove the menus (group content).
      4. Undo what the patch created (thanks to @safetypin)
        1. function custom_module_pre_upgrade() {
            $database = \Drupal::database();
          
            // Create temporary table for group_content__entity_id_str.
            $database->query("CREATE TABLE temporary_group_menu (
              group_id int(11) UNSIGNED NOT NULL,
              group_content_id int(11) UNSIGNED NOT NULL,
              menu_id_str varchar(255) NOT NULL
            )");
          
            // Copy data from group_content__entity_id_str to temporary_group_menu.
            $database->query("
              INSERT INTO temporary_group_menu (group_id, group_content_id, menu_id_str)
              SELECT gcfd.gid, gceis.entity_id, gceis.entity_id_str_target_id
              FROM group_content__entity_id_str AS gceis
              JOIN group_content_field_data AS gcfd ON gceis.entity_id = gcfd.id
            ");
          
            // Delete all group content from temporary_group_menu.
            $result = $database->query("
              SELECT group_content_id FROM temporary_group_menu
            ");
            foreach ($result as $row) {
              $group_content_id = $row->group_content_id;
              $group_content = \Drupal\group\Entity\GroupContent::load($group_content_id);
              $group_content->delete();
            }
          
            // We need to re-add the entity_id column to group_content_field_data.
            // Get data from the table that the patch added ('group_content__entity_id').
            $database->query("ALTER TABLE group_content_field_data ADD entity_id INT(11);");
            $database->query("
              UPDATE group_content_field_data
              JOIN group_content__entity_id ON group_content_field_data.id = group_content__entity_id.entity_id
              SET group_content_field_data.entity_id = group_content__entity_id.entity_id_target_id;
            ");
          
            // Now, we can remove all the messed up config, from the old field.
            $database->query("DELETE FROM key_value WHERE name='group_content.field_schema_data.entity_id';");
            $database->query("DELETE FROM key_value WHERE name='group_content.field_schema_data.entity_id_str';");
            $database->query("DROP TABLE group_content__entity_id;");
            $database->query("DROP TABLE group_content__entity_id_str;");
            $database->query("DELETE FROM key_value WHERE name='group_content.field_storage_definitions';");
          }
          
    2. Remove the patch and update group to version 2.x (2.2.2 in my case)
    3. Run the function below to:
      1. Recreate the menus (as group relationships)
      2. Remove the temporary table
      function custom_module_post_upgrade() {
        $database = \Drupal::database();
      
        // Recreate group menus.
        $result = $database->query("SELECT group_id, menu_id_str FROM temporary_group_menu");
        foreach ($result as $row) {
          $gid = $row->group_id;
          $menu_id = $row->menu_id_str;
          $group = \Drupal::entityTypeManager()->getStorage('group')->load($gid);
          $menu = \Drupal::entityTypeManager()->getStorage('menu')->load($menu_id);
      
          if (!$group || !$menu) {
            continue;
          }
      
          $group->addRelationship($menu, 'group_menu:menu');
        }
      
        // Delete table since we don't need it anymore.
        $database->query("DROP TABLE temporary_group_menu;");
      }
      
Production build 0.71.5 2024