Problem/Motivation

The 1.5 security release proposed in https://www.drupal.org/sa-contrib-2026-002 breaks the user edit form display. Before the Update (Tested on 1.3 and 1.4) the role_change field was placed where the default role field would be placed as well – At the top, next to the user´s default fields like status.
After the update to 1.5, the role_change field appears at the very bottom of the user edit form.
Altering the #weight with a form_alter for the user edit form does not have any effect.

Steps to reproduce

  1. Install Role delegation 1.5
  2. Create and place fields on the user edit form
  3. Find that role_change now appears at the bottom of the page instead of where it belongs

Proposed resolution

  1. Find out what causes the position change
  2. Provide a patch for a quick solution (!) User should be able to update to 1.5 for security reasons!
  3. Release a fixed version
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

kevinkonsorr created an issue. See original summary.

kevinkonsorr’s picture

Issue summary: View changes
dieterholvoet’s picture

Priority: Major » Normal

That will probably be the result of #3387126: Users need 'administer permissions' to edit roles on the user edit page. The issue there was that the role_change field is assigned to the account group (the 'User name and password' field). If this is hidden in form display, the role_change field is hidden as well because it's assigned to a non-existing field group. We can add the $form['role_change']['#group'] = 'account'; line back, but we'll need to figure out some kind of check to make sure the group is only changed if the group is visible.

dieterholvoet’s picture

Status: Active » Needs review

I implemented a possible fix, could you test the MR?

  • dieterholvoet committed 866dfbe1 on 8.x-1.x
    Issue #3567638 by kevinkonsorr, dieterholvoet: 1.5 breaks form display...
dieterholvoet’s picture

Status: Needs review » 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.

Status: Fixed » Closed (fixed)

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