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

Command icon 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

lthomasen created an issue. See original summary.

velmir_taky made their first commit to this issue’s fork.

velmir_taky’s picture

Status: Active » Needs review

Composer removes social_group_secret and social_secret_group_featured files when updating to 13.0.0, but they're still in core.extension. Drupal can't bootstrap because of missing modules, so social_group_update_13001() never runs.

Added deprecated stub info.yml files for both modules and fixed the update hook to handle social_secret_group_featured explicitly (the original code only uninstalled social_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.

fathima.s’s picture

we 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

velmir_taky’s picture

Tested 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_secret and social_secret_group_featured
3. Create groups of all four types (public, open, closed, secret)
4. composer require goalgorilla/open_social:13.0.0
5. Apply MR !95 (stub .info.yml files + uninstall order fix)
6. Run drush updatedb
7. Check: drush eval 'print_r(array_keys(\Drupal::entityTypeManager()->getStorage("group_type")->loadMultiple()));'

Result

closed_group, open_group, public_group are deleted — but secret_group group type entity remains as an orphan with zero groups.

Root cause

In social_group_update_13001() the loadMultiple() call on line 805 only lists three group types:

$group_type_storage->loadMultiple(["closed_group", "open_group", "public_group"])

secret_group is missing. Uninstalling the stub module does not cascade-delete the group type entity because the stub has no config.

Fix

Added "secret_group" to the loadMultiple() 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.

fathima.s’s picture

I 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).

kingdutch’s picture

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.