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.
shorturl implements hook_init()
within that function, menu_get_item() is invoked
this triggers the access callback for node/add/$foo (node_access) before OGUR roles are initialized
changing the module weight of OGUR to be heavier than shorturl works around this successfully, but i don't know if that's an ideal solution.
I can think of a few other approaches to solve this, of which i'm not really sure the feasibility:
- hook_menu_alter to override node_access
- something with hook_boot() instead of hook_init()
- ???
- profit
If a maintainer can comment on this, i am happy to implement (or try to implement) a patch.
Comment | File | Size | Author |
---|---|---|---|
#4 | og_user_roles-shorturl-conflict-1230446.patch | 820 bytes | AaronBauman |
#2 | og_user_roles-shorturl-conflict-1230446.patch | 820 bytes | AaronBauman |
Comments
Comment #1
sunWhat weight is shorturl using?
Comment #2
AaronBaumanhere's the patch for changing the weight.
Comment #3
sun1) Can you answer the question in #1 ?
2) The patch is doing the opposite of what needs to be done (increasing instead of decreasing).
Comment #4
AaronBauman1) -100
2) heh, oops. updated patch attached.