Add update instructions to the release notes

Created on 11 December 2015, over 9 years ago
Updated 1 September 2025, 8 days ago

After #1730182: make module name same a project name β†’ , updating the module disables it. At least, that is what happened when I updated a bunch of modules at once using drush. It was a while before I noticed that this one was not working.

Please add a note to the release notes β†’ warning of this problem. Ideally, the administrator should disable the module, update the code, and then enable it and configure it again.

It would also help to copy over the configuration since the variable name, like the file names, has changed. Something like this (untested) should do the trick:

/**
 * Copy configuration from the 7.x-1.1 version, and remove it from the system table.
 */
function shortcutperrole_update_7100() {
  // Copy the configuration and delete the obsolete variable.
  $old_config = variable_get('shortcut_per_role', array());
  $new_config = variable_get('shortcutperrole', array());
  if (empty($new_config) && !empty($old_config)) {
    variable_set('shortcutperrole', $old_config);
  }
  variable_del('shortcut_per_role');

  // Update the system table.
  db_delete('system')->condition('name', 'shortcut_per_role')->execute();
}

If you add that and call it version 7.x-1.3, then ignore what I said about disabling the old version before installing the new one.

πŸ“Œ Task
Status

Postponed: needs info

Version

1.2

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ͺπŸ‡¨Ecuador jwilson3

    Thank you for creating this issue to improve the Shortcut per Role module.

    I am working through modules I help maintain to decide if this task is still relevant to the currently supported version of the module. There hasn't been any discussion here for over 9 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024