The permissions colspan for module headings references the wrong part of the form array during theming. It works visually because it counts a part of the array that is always larger than the number of roles because each role is added as a key in the part of $form['role_names']. For a default minimal install, there is just anonymous and authenticated, which you'll see here are added as keys 1 and 2, along with all the other parts of the form. This means the colspan for the module headings on the permissions page here is 19. Try searching for colspan="19"> on the HTML page source of admin/user/permissions.

array(18) {
  ["#type"]=>
  string(5) "value"
  ["#value"]=>
  array(2) {
    [1]=>
    string(14) "anonymous user"
    [2]=>
    string(18) "authenticated user"
  }
  [1]=>
  array(9) {
    ["#markup"]=>
    string(14) "anonymous user"
    ["#tree"]=>
    bool(true)
    ["#parents"]=>
    array(1) {
      [0]=>
      int(1)
    }
    ["#array_parents"]=>
    array(2) {
      [0]=>
      string(10) "role_names"
      [1]=>
      int(1)
    }
    ["#weight"]=>
    int(0)
    ["#processed"]=>
    bool(false)
    ["#id"]=>
    string(6) "edit-1"
    ["#defaults_loaded"]=>
    bool(true)
    ["#sorted"]=>
    bool(true)
  }
  [2]=>
  array(9) {
    ["#markup"]=>
    string(18) "authenticated user"
    ["#tree"]=>
    bool(true)
    ["#parents"]=>
    array(1) {
      [0]=>
      int(2)
    }
    ["#array_parents"]=>
    array(2) {
      [0]=>
      string(10) "role_names"
      [1]=>
      int(2)
    }
    ["#weight"]=>
    float(0.001)
    ["#processed"]=>
    bool(false)
    ["#id"]=>
    string(6) "edit-2"
    ["#defaults_loaded"]=>
    bool(true)
    ["#sorted"]=>
    bool(true)
  }
  ["#tree"]=>
  bool(false)
  ["#parents"]=>
  array(1) {
    [0]=>
    string(10) "role_names"
  }
  ["#array_parents"]=>
  array(1) {
    [0]=>
    string(10) "role_names"
  }
  ["#weight"]=>
  int(0)
  ["#processed"]=>
  bool(false)
  ["#description"]=>
  string(0) ""
  ["#title"]=>
  string(0) ""
  ["#attributes"]=>
  array(0) {
  }
  ["#required"]=>
  bool(false)
  ["#input"]=>
  bool(true)
  ["#id"]=>
  string(15) "edit-role-names"
  ["#name"]=>
  string(10) "role_names"
  ["#defaults_loaded"]=>
  bool(true)
  ["#sorted"]=>
  bool(true)
}

It should reference #value, which is:

array(2) {
  [1]=>
  string(14) "anonymous user"
  [2]=>
  string(18) "authenticated user"
}
CommentFileSizeAuthor
user_admin_perm_colspan.patch891 bytesdeekayen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pp’s picture

Status: Needs review » Reviewed & tested by the community

I reviewed the patch. It's resolve this problem.

pp

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

Status: Fixed » Closed (fixed)

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