Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am using this module to create new roles and set permissions for these roles inside hook_install(). Permissions are set fine for modules that are not part of Core -required, but permissions belonging to modules that are under the Core - required package are not being updated. The Permissions API module is installed separately on it's own before the module calling the Permissions API functions is installed.
Cheers,
Antoine
Comments
Comment #1
ebeyrent CreditAttribution: ebeyrent commentedComment #2
ebeyrent CreditAttribution: ebeyrent commentedEach function in Permissions API returns a value if the function was successful, or FALSE if there was a failure. There's also quite a bit of logging to watchdog. If you're not getting values back from the function calls, and there's nothing in watchdog, then it sounds like the hook_install() implementation might not be firing the way you expect. Can you please check the function returns and watchdog to see if any errors are being logged?
You might also consider moving your setup functions to a hook_enable() implementation.
Comment #3
ebeyrent CreditAttribution: ebeyrent commentedClosed due to lack of response.