Problem/Motivation
When updating to open social 13.0.0 from 12.4.16, the social_group secret is removed by composer and update reports an error.
Steps to reproduce
The following error is reported:
[error] (Currently using Missing or invalid modules The following modules are marked as installed in the core.extension
configuration, but they are missing:
* social_secret_group_featured
* social_group_secret
If ignored, the secret groups are not converted to flexible groups, and the update fails.
Issue fork social-3574989
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 #4
velmir_taky commentedComposer removes
social_group_secretandsocial_secret_group_featuredfiles when updating to 13.0.0, but they're still incore.extension. Drupal can't bootstrap because of missing modules, sosocial_group_update_13001()never runs.Added deprecated stub info.yml files for both modules and fixed the update hook to handle
social_secret_group_featuredexplicitly (the original code only uninstalledsocial_group_secret).Tested on clean 12.4.x => 13.0.0 upgrade with both modules enabled — updates pass, secret groups migrate to flexible groups correctly.
Comment #5
fathima.s commentedwe were using 12.2 version and recently upgraded to 13.0.0.get a similar error n drush updb.What will happen to existing secret groups once update db is complete.IF these are migrated as mentioned ,is there a way to opt out migration
Comment #6
velmir_taky commentedTested the full upgrade path from Open Social 12.4.x to 13.0.0 and found an additional issue.
Steps to reproduce
1. Install Open Social 12.4.x
2. Enable
social_group_secretandsocial_secret_group_featured3. Create groups of all four types (public, open, closed, secret)
4.
composer require goalgorilla/open_social:13.0.05. Apply MR !95 (stub .info.yml files + uninstall order fix)
6. Run
drush updatedb7. Check:
drush eval 'print_r(array_keys(\Drupal::entityTypeManager()->getStorage("group_type")->loadMultiple()));'Result
closed_group, open_group, public_groupare deleted — butsecret_groupgroup type entity remains as an orphan with zero groups.Root cause
In
social_group_update_13001()theloadMultiple()call on line 805 only lists three group types:$group_type_storage->loadMultiple(["closed_group", "open_group", "public_group"])secret_groupis missing. Uninstalling the stub module does not cascade-delete the group type entity because the stub has no config.Fix
Added
"secret_group"to theloadMultiple()array:$group_type_storage->loadMultiple(["closed_group", "open_group", "public_group", "secret_group"])Verified
After the fix, full upgrade cycle passes cleanly: all four group types deleted, all groups migrated to
flexible_group, both secret modules uninstalled.Comment #7
fathima.s commentedI tried comment #6 .Still secret groups are not migrated and there configurations are not deleted.Other group types are converted.
Now getting below error on drush updb
social_group_flexible_group module
Update #130003
Failed: Drupal\Core\Entity\EntityStorageException: Could not assign role with ID flexible_group-group_manager: Role belongs to a different group type. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of /core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Comment #8
kingdutchhttps://git.drupalcode.org/project/social/-/commit/57f15992d222a14d1acda...
Tagged as 13.0.2