Problem/Motivation
The following error is being thrown while upgrading from 9.18 to 10.2.x, preventing from commencing the upgrade process.
Error: Call to a member function label() on null in /var/www/html/web/modules/contrib/group/src/Plugin/GroupContentEnablerBase.php on line 171 #0 /var/www/html/web/modules/contrib/group/src/Entity/Storage/GroupContentTypeStorage.php(115): Drupal\group\Plugin\GroupContentEnablerBase->getContentTypeLabel()
Steps to reproduce
- Install latest 9.x (possibly 10.0.x or 10.1.x)
- Configure open social to have only 2 groups, delete public_group for instance
- Export all config and settings related
- Upgrade to 10.2.5, perform
drush updatedb - This error happens
Proposed resolution
In social_group.install, function social_group_update_8906(), instead of assuming that there are a public_group, open_group and close_group, use group_type storage to load existing group_types, then use group_type_ids to create group managers by default.
Error stack trace:
Error: Call to a member function label() on null in /var/www/html/web/modules/contrib/group/src/Plugin/GroupContentEnablerBase.php on line 171 #0 /var/www/html/web/modules/contrib/group/src/Entity/Storage/GroupContentTypeStorage.php(115): Drupal\group\Plugin\GroupContentEnablerBase->getContentTypeLabel()
#1 /var/www/html/web/modules/contrib/group/src/Plugin/GroupContentEnablerManager.php(269): Drupal\group\Entity\Storage\GroupContentTypeStorage->createFromPlugin(Object(Drupal\group\Entity\GroupType), 'group_membershi...')
#2 /var/www/html/web/modules/contrib/group/group.module(175): Drupal\group\Plugin\GroupContentEnablerManager->installEnforced()
#3 [internal function]: group_rebuild()
#4 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(403): call_user_func_array('group_rebuild', Array)
#5 /var/www/html/web/core/includes/common.inc(1082): Drupal\Core\Extension\ModuleHandler->invokeAll('rebuild')
#6 /home/wodby/.composer/vendor/drush/drush/commands/core/drupal/update.inc(125): drupal_flush_all_caches()
#7 /home/wodby/.composer/vendor/drush/drush/commands/core/drupal/batch.inc(163): drush_update_cache_rebuild(Object(DrushBatchContext))
#8 /home/wodby/.composer/vendor/drush/drush/commands/core/drupal/batch.inc(111): _drush_batch_worker()
#9 /home/wodby/.composer/vendor/drush/drush/includes/batch.inc(98): _drush_batch_command('3954')
#10 /home/wodby/.composer/vendor/drush/drush/commands/core/drupal/update.inc(235): drush_batch_command('3954')
#11 /home/wodby/.composer/vendor/drush/drush/commands/core/core.drush.inc(1231): _update_batch_command('3954')
#12 /home/wodby/.composer/vendor/drush/drush/includes/command.inc(422): drush_core_updatedb_batch_process('3954')
#13 /home/wodby/.composer/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#14 /home/wodby/.composer/vendor/drush/drush/includes/command.inc(199): drush_command('3954')
#15 /home/wodby/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#16 /home/wodby/.composer/vendor/drush/drush/includes/preflight.inc(67): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#17 /home/wodby/.composer/vendor/drush/drush/drush.php(12): drush_main()| Comment | File | Size | Author |
|---|---|---|---|
| #3 | error-when-upgrading-to-10.2.5_issue-3232778#3.patch | 1.22 KB | jordan.jamous |
Issue fork social-3232778
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jordan.jamous commentedThe patch
Comment #4
jordan.jamous commentedComment #5
tbsiqueiraClosing issue as outdated, please feel free to reopen if still relevant