Problem/Motivation
I have a site where I use this module to show the user role(s) on the user profile page.
I updated the site to Drupal 11.
When users went to their profile page the result was a WSOD page.
I removed the User Role from the user profile display and the problem went away.
This is the error from the log:
Error: Call to undefined function user_role_names() in displayrole_user_view() (line 44 of /home/customer/public_html/modules/contrib/displayrole/displayrole.module).
I found this related issue.
[Drupal 11] user_role_names() deprecated in 10.2 and removed in 11.0
https://www.drupal.org/project/linkit/issues/3412457
From the issue text:
"Problem/Motivation
user_role_names() has been deprecated in Drupal 10.2.0 and will be removed in Drupal 11. See user_roles() and user_role_names() are deprecated for more details."
Looks like this module is dead in Drupal 11.
Comments
Comment #2
mlncn commentedThank you for the report, so sorry for releasing a Drupal 11 version that was not actually compatible.
Gentle reminder that rather than proclaiming a module "dead" this is a golden opportunity to contribute a fix. Although, on second thought, that is thousands of words making clear how complicated it is to contribute what should be the simplest of things. Ah well. Fix coming shortly.
Comment #4
mlncn commentedComment #6
mlncn commentedTested, fixed follow-up error, and tagged a release, 8.x-1.3.
Comment #7
dadderley commented@mlncn
I apologize for being over dramatic saying that the module was dead.
I installed the fixed 8.x-1.3 version of the module and it works perfectly.
Thank you very much for the quick fix.
Comment #8
mlncn commentedThank you so much! It definitely was not healthy there for a minute and very much needed this report!
Comment #9
dadderley commentedcheers