Body: <p>After updating to Drupal 10.2.5 and CiviCRM 5.71.2 (or later) under IIS we get many similar errors like:</p>
  <p>User error: &quot;0&quot; is an invalid render array key in Drupal\Core\Render\Element::children() (line 98 of core\lib\Drupal\Core\Render\Element.php).</p>
  <p>when managing Drupal People -&gt; Permissions.</p>
  <p>Debugging shows that CiviCRM related permissions like &quot;Administer CiviCRM&quot; are involved. Debugging indicates that there are key-value pairs involved where the key is numeric and the value is not an array.</p>
  <p>Has anyone else seen the issue? Has anyone any suggestions?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-04-10T14:39:34.307Z
Comments.Text: Looks likely related to https://github.com/civicrm/civicrm-core/pull/29173
Comments.UserDisplayName: Coleman
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-04-11T14:21:27.977Z
Comments.Text: @Coleman Many thanks. It is as useful pointer, but I haven't been able to work out from where Drupal gets the 'offending' permissions. 
  <Drupal root>/vendor/civicrm/civicrm-core/CRM/Core/Permission/Base.php getAllModulePermissions doesn't get them. <Drupal root.\vendor\civicrm\civicrm-core\CRM\Core\Permission.php getCorePermissions gets them 'correctly' formatted.
Comments.UserDisplayName: Stephen Palmstrom
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-24T16:54:34.837Z
Comments.Text: I replaced the 'offending' line in `<Drupal root>/web/core/lib/Drupal/Core/Render/Element.php` with a line that logged the $value variable. It turns out that the following Drupal/CiviCRM permissions are the problem:
  
  'view all contacts is not an array'
  'administer CiviCRM is not an array'
  'administer CiviCRM system is not an array'
  'edit all contacts is not an array'
  'administer CiviCRM is not an array'
  'administer CiviCRM data is not an array'
  'edit all contacts is not an array'
Comments.UserDisplayName: Stephen Palmstrom
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-24T18:27:12.097Z
Comments.Text: I replaced the 'offending' line in `<Drupal root>/web/core/lib/Drupal/Core/Render/Element.php` with a line that logged the $value variable. It turns out that the following Drupal/CiviCRM permissions are the problem:
  
  'view all contacts is not an array'
  'administer CiviCRM is not an array'
  'administer CiviCRM system is not an array'
  'edit all contacts is not an array'
  'administer CiviCRM is not an array'
  'administer CiviCRM data is not an array'
  'edit all contacts is not an array'
  
  Notice the duplication. They also appear in the permissions list, so it seems these are extraneous.
Comments.UserDisplayName: Stephen Palmstrom
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-25T18:30:07.757Z
Comments.Text: @StephenPalmstrom I just started seeing this on a site too - Drupal 10.3.0, Civi 5.74.4, on a LAMP stack.  I've gotten about as far as you have, but wanted to report it's still an issue, and OS/platform is irrelevant
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-25T18:36:40.653Z
Comments.Text: @StephenPalmstrom I log the same permissions you mention in your comment above. There's a new feature of "implied" permissions. Well, it's not new, but new that you can declare them in an extension.  All of these permissions strike me as ones that imply or are implied by other permissions.
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-27T13:12:51.990Z
Comments.Text: @JonG-MegaphoneTech Thanks. Where can we discover these implied permissions? They are obviously not being loaded correctly.
Comments.UserDisplayName: Stephen Palmstrom
Tags: <drupal><permissions>
Title: User error: "0" is an invalid render array key in Drupal\Core\Render\Element::children() (line 98 of core\lib\Drupal\Core\Render\Element.php)
ThreadText: # User error: "0" is an invalid render array key in Drupal\Core\Render\Element::children() (line 98 of core\lib\Drupal\Core\Render\Element.php)
  
  (Asked by: username_0 on 2024-04-10)
  
  After updating to Drupal 10.2.5 and CiviCRM 5.71.2 (or later) under IIS we get many similar errors like:
  
  User error: "0" is an invalid render array key in Drupal\Core\Render\Element::children() (line 98 of core\lib\Drupal\Core\Render\Element.php).
  
  when managing Drupal People -> Permissions.
  
  Debugging shows that CiviCRM related permissions like "Administer CiviCRM" are involved. Debugging indicates that there are key-value pairs involved where the key is numeric and the value is not an array.
  
  Has anyone else seen the issue? Has anyone any suggestions?
  
  **Tags:** drupal, permissions
  
  > **Comments:**
  > **username_1**: Looks likely related to https://github.com/civicrm/civicrm-core/pull/29173  
  > **username_0**: @username_1 Many thanks. It is as useful pointer, but I haven't been able to work out from where Drupal gets the 'offending' permissions.  <Drupal root>/vendor/civicrm/civicrm-core/CRM/Core/Permission/Base.php getAllModulePermissions doesn't get them. <Drupal root.\vendor\civicrm\civicrm-core\CRM\Core\Permission.php getCorePermissions gets them 'correctly' formatted.  
  > **username_0**: I replaced the 'offending' line in `<Drupal root>/web/core/lib/Drupal/Core/Render/Element.php` with a line that logged the $value variable. It turns out that the following Drupal/CiviCRM permissions are the problem:  'view all contacts is not an array' 'administer CiviCRM is not an array' 'administer CiviCRM system is not an array' 'edit all contacts is not an array' 'administer CiviCRM is not an array' 'administer CiviCRM data is not an array' 'edit all contacts is not an array'  
  > **username_0**: I replaced the 'offending' line in `<Drupal root>/web/core/lib/Drupal/Core/Render/Element.php` with a line that logged the $value variable. It turns out that the following Drupal/CiviCRM permissions are the problem:  'view all contacts is not an array' 'administer CiviCRM is not an array' 'administer CiviCRM system is not an array' 'edit all contacts is not an array' 'administer CiviCRM is not an array' 'administer CiviCRM data is not an array' 'edit all contacts is not an array'  Notice the duplication. They also appear in the permissions list, so it seems these are extraneous.  
  > **username_2**: @username_0 I just started seeing this on a site too - Drupal 10.3.0, Civi 5.74.4, on a LAMP stack.  I've gotten about as far as you have, but wanted to report it's still an issue, and OS/platform is irrelevant  
  > **username_2**: @username_0 I log the same permissions you mention in your comment above. There's a new feature of "implied" permissions. Well, it's not new, but new that you can declare them in an extension.  All of these permissions strike me as ones that imply or are implied by other permissions.  
  > **username_0**: @username_2 Thanks. Where can we discover these implied permissions? They are obviously not being loaded correctly.  
  
  ---
  
  ## 0 answers
  
  