Problem/Motivation

I noticed this issue after the distribution we use was updated to Groups v2.

The problem is about the post update functions. 8.x-1.x had five update functions, which were removed in commit edf76f13fe:

  1. group_post_update_group_type_group_content_type_dependencies()
  2. group_post_update_group_content_type_dependencies()
  3. group_post_update_grant_access_overview_permission()
  4. group_post_update_view_cache_contexts()
  5. group_post_update_make_group_revisionable()

Unfortunately, this removal wasn't registered properly, with a group_removed_post_updates() function. This means that every (new) Group installation will miss to register these post updates.

I believe this is not an issue in 99.9% of the cases, but I have a different situation. I am moving content between sites having the same structure, but one key requirement to this the sites have the same module schema versions / post updates / fields etc. And, this is why I noticed this issue.

Steps to reproduce

  1. Install a project with the latest Group 8.x-1.x tag
  2. Upgrade codebase and db schema to Group v2
  3. Notice that the post-update functions described in the above point have been registered
  1. Install a project with Group v2 (or v3, or v4 HEAD)
  2. Because there is no info about the (removed) post updates, nothing is registered.

The expected behavior is to have all the five functions being registered on install.

Proposed resolution

  1. 1. Put back the said post update functions (with empty body) into the next release of Group v2, Group v3 and maybe Group v4.
  2. 2. In Group v4, properly register the removed post update functions:
    function group_removed_post_updates(): array {
      return [
        'group_post_update_group_type_group_content_type_dependencies' => '4.0.0',
        'group_post_update_group_content_type_dependencies' => '4.0.0',
        'group_post_update_grant_access_overview_permission' => '4.0.0',
        'group_post_update_view_cache_contexts' => '4.0.0',
        'group_post_update_make_group_revisionable' => '4.0.0',
      ];
    }
    

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork group-3532775

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

huzooka created an issue. See original summary.

kristiaanvandeneynde’s picture

Good catch, can definitely accommodate this.

huzooka’s picture

@kristiaanvandeneynde Thank you!
If nobody picks this up I can start working on this tomorrow.

huzooka’s picture

Status: Active » Needs work

kristiaanvandeneynde’s picture

Status: Needs work » Fixed

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.

kristiaanvandeneynde’s picture

They were removed before v2 was released, so I put the removal version at 2.0.0

Status: Fixed » Closed (fixed)

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