hello

I found this error in the permissions tab when one makes a migration from drupal 7 to Drupal 8 using drush.

Error: Unsupported operand types in Drupal\user\Form\UserPermissionsForm->buildForm() (line 164 of /job/www/drupal/core/modules/user/src/Form/UserPermissionsForm.php)

      $perm_item += [
          'description' => '',
          'restrict access' => FALSE,
          'warning' => !empty($perm_item['restrict access']) ? $this->t('Warning: Give to trusted roles only; this permission has security implications.') : '',
        ];

One possible solution that worked for me was to modify this by:

        $perm_item = array_merge( $perm_item, [
              'description' => '',
              'restrict access' => FALSE,
              'warning' => !empty($perm_item['restrict access']) ? $this->t('Warning: Give to trusted roles only; this permission has security implications.') : '',
        ]);
CommentFileSizeAuthor
#4 0001-Parche-error-permisos.patch1.74 KBjoertru

Comments

joertru created an issue. See original summary.

joertru’s picture

Issue summary: View changes
joertru’s picture

joertru’s picture

StatusFileSize
new1.74 KB

Version: 8.5.3 » 8.5.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.5.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

rsr25694’s picture

is it work for non dev drupal version?

quietone’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +migrate-d7-d8, +Bug Smash Initiative

@joertru, thanks for the report. Can you provide some more information. How did you migrate from Drupal 7 to Drupal 8? Was this a custom migration with drush or did you do it from /upgrade? Do you know what permission was causing the problem? What contrib modules were installed.

Thanks.

Tagging for migration so it is found in my typical searches.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
quietone’s picture

Is this issue still a problem?

To work on this complete steps to reproduce the issue (starting from "Install Drupal core") are needed.

Since we need more information to move forward with this issue, I am keeping the status at 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!

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

benjifisher’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

It has been more than three months since @quietone asked for more information on this report. As far as I know, no one else has reported this problem. I am closing this issue.