Problem (> 9.1) with User Permissions

Exception Occurred: …/concrete/src/Permission/Access/EditUserPropertiesUserAccess.php:79 Undefined array key “propertiesExcluded” (2)

when trying to add groups in ‘General User Permissions’

I am unable to recreate this, which permission are you trying to add groups to and have you enabled advanced permissions?

yes, advanced permissions are enabled.
i’m trying to add a group to ‘Edit User Details’ (Access, included). First ‘Save’ adds the group to the list, second ‘Save’ hangs with an infinite - nearly ‘finished’ - small blue progress bar at top of window. With the mentioned error in the Log

I have just tried again by adding a ‘Members’ group to the ‘Edit User Details’ and ‘Access User Search’ with no problems at all.
Maybe a server config problem?
I have attached a screenshot of what I am seeing.

Ok, I did some tests with different configs (same server, same server settings, except for the variations in PHP-version)…

With PHP 7.4.26: no problem at all (works with 9.0.2 and with 9.1.0 and with 9.1.1)

However when I switch the current PHP version to 8.0.13, one CANNOT add a user group (User Permissions). Stuck + error message in log (EditUserPropertiesUserAccess.php:79 Undefined array key “propertiesExcluded” (2)). Problem is there with 9.1.0 and 9.1.1

And - while inspecting the log - I encounter several error messages indicating problems with undefined variables. One example:

Exception Occurred: …/concrete/single_pages/download_file.php:23 Undefined variable $fID (2)

Undefined variables? Seems like the codebase of concrete9 has not been sorted out fully to comply to php8…

And - if you want I make another topic - there are other php8 related problems. A user who is member of the Administrators and who wants to view the members (Dashboard->Members->Search Users) doesn’t have any user listed. Simply switching back to PHP 7.4 ‘brings back’ all those members (unlisted in PHP8)

You should report your findings as a ‘Bug’ so the core team are made aware. go to Issues · concretecms/concretecms · GitHub to report it.

As a temporary workaround I have wrapped each of the erroneous code blocks with an ‘isset’ condition.
So the three code blocks now look like this (starting on line 79).

if (isset($args['propertiesExcluded'])) { // add this line
			if (is_array($args['propertiesExcluded'])) {
				foreach ($args['propertiesExcluded'] as $peID => $attributePermission) {
					$allowEditUNameExcluded = 0;
					$allowEditUEmailExcluded = 0;
					$allowEditUPasswordExcluded = 0;
					$allowEditUAvatarExcluded = 0;
					$allowEditUTimezoneExcluded = 0;
					$allowEditUDefaultLanguageExcluded = 0;
					$allowEditUHomeFileManagerFolderIDExcluded = 0;
					if (!empty($args['allowEditUNameExcluded'][$peID])) {
						$allowEditUNameExcluded = $args['allowEditUNameExcluded'][$peID];
					}
					if (!empty($args['allowEditUEmailExcluded'][$peID])) {
						$allowEditUEmailExcluded = $args['allowEditUEmailExcluded'][$peID];
					}
					if (!empty($args['allowEditUPasswordExcluded'][$peID])) {
						$allowEditUPasswordExcluded = $args['allowEditUPasswordExcluded'][$peID];
					}
					if (!empty($args['allowEditUAvatarExcluded'][$peID])) {
						$allowEditUAvatarExcluded = $args['allowEditUAvatarExcluded'][$peID];
					}
					if (!empty($args['allowEditUTimezoneExcluded'][$peID])) {
						$allowEditUTimezoneExcluded = $args['allowEditUTimezoneExcluded'][$peID];
					}
					if (!empty($args['allowEditUDefaultLanguageExcluded'][$peID])) {
						$allowEditUDefaultLanguageExcluded = $args['allowEditUDefaultLanguageExcluded'][$peID];
					}
					if (!empty($args['allowEditUHomeFileManagerFolderIDExcluded'][$peID])) {
						$allowEditUHomeFileManagerFolderIDExcluded = $args['allowEditUHomeFileManagerFolderIDExcluded'][$peID];
					}
					$v = [$this->getPermissionAccessID(), $peID, $attributePermission, $allowEditUNameExcluded, $allowEditUEmailExcluded, $allowEditUPasswordExcluded, $allowEditUAvatarExcluded, $allowEditUTimezoneExcluded, $allowEditUDefaultLanguageExcluded, $allowEditUHomeFileManagerFolderIDExcluded];
					$db->executeQuery('insert into UserPermissionEditPropertyAccessList (paID, peID, attributePermission, uName, uEmail, uPassword, uAvatar, uTimezone, uDefaultLanguage, uHomeFileManagerFolderID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', $v);
				}
			}
        } // add this line

        if (isset($args['akIDInclude'])) { // add this line
			if (is_array($args['akIDInclude'])) {
				foreach ($args['akIDInclude'] as $peID => $akIDs) {
					foreach ($akIDs as $akID) {
						$v = [$this->getPermissionAccessID(), $peID, $akID];
						$db->executeQuery('insert into UserPermissionEditPropertyAttributeAccessListCustom (paID, peID, akID) values (?, ?, ?)', $v);
					}
				}
			}
		} // add this line

		if (isset($args['akIDExclude'])) { // add this line
			if (is_array($args['akIDExclude'])) {
				foreach ($args['akIDExclude'] as $peID => $akIDs) {
					foreach ($akIDs as $akID) {
						$v = [$this->getPermissionAccessID(), $peID, $akID];
						$db->executeQuery('insert into UserPermissionEditPropertyAttributeAccessListCustom (paID, peID, akID) values (?, ?, ?)', $v);
					}
				}
			}
        } // add this line