group_update_9211 declared twice in group.install

Created on 27 November 2024, 6 months ago

Problem/Motivation

In https://www.drupal.org/project/group/issues/3488960 🐛 Update path from 2.3 to 3.3 fails due to wrong hook_update_N number Active the update hook was renamed, but at least in the 2.3.x branch (haven't yet checked others) there already was a hook with the new number (9211), resulting in a fatal error when trying to run updates.

Steps to reproduce

  • Update to Group 2.3.1 (from 2.3.0)
  • Run the \Drupal::service('update.update_hook_registry')->setInstalledVersion('group', 9211); command, eg on drush php
  • Try to run drush updb
  • Witness error message: PHP Fatal error: Cannot redeclare group_update_9211() (previously declared in /app/public/modules/contrib/group/group.install:298) in /app/public/modules/contrib/group/group.install on line 314

Proposed resolution

Rename hook to 9212. Document how to use the correct schema version again, like it was documented on https://www.drupal.org/project/group/releases/2.3.1 .

Remaining tasks

  • Create MR
  • Plan release documentation
🐛 Bug report
Status

Active

Version

2.3

Component

Code

Created by

🇫🇮Finland kekkis Pirkkala

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

Comments & Activities

Production build 0.71.5 2024