- Issue created by @mimpro
The module on its configuration page throw error 404, and when check at report it shows message:
[error php] Error: Call to undefined function Drupal\stickynav\Form\user_roles() in Drupal\stickynav\Form\StickynavSettingsForm->buildForm() (line 73 of /var/www/html/modules/contrib/stickynav/src/Form/StickynavSettingsForm.php)
First, the module is unable to be installed in Drupal 11. I manually download and change the .info file, add the core requirement to 11. Then able to install via drush. On the module page, on this module, there is configuration icon. Click on this, you will get error page.
With the error message, I change the file /modules/contrib/stickynav/src/Form/StickynavSettingsForm.php
line 73 :
original: $roles = user_roles();
change to : $roles = \Drupal::entityTypeManager()->getStorage('user_role')->loadMultiple();
save this and clear cache.
Try get back to the module configuration page, it WORKS well.
And it works on the web page as well.
Need someone to update the code, and update also for core availability Drupal 11.
none
none
none
Active
1.4
Code