Problem/Motivation

The user_role_names function was removed in Drupal 11, see: https://www.drupal.org/project/drupal/issues/3432868 and https://www.drupal.org/node/3349759.

The function is still used in both views filters:

https://git.drupalcode.org/project/views_published_or_roles/-/blob/8.x-1...

https://git.drupalcode.org/project/views_published_or_roles/-/blob/8.x-1...

We need to replace it, otherwise the modules it not fully compatible with D11.

Steps to reproduce

Proposed resolution

Replace it with Role::loadMultiple()

Remaining tasks

User interface changes

API changes

Data model changes

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

poker10 created an issue. See original summary.

joseph.olstad made their first commit to this issue’s fork.

joseph.olstad’s picture

Brutal

  • joseph.olstad committed eae3c747 on 8.x-1.x
    [#3531102] fix: Undefined function 'user_role_names' in Drupal 11
    
joseph.olstad’s picture

Status: Active » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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