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've got what may very well be a "poorly written" issue. My module appears to break OG in 6.x.
When my module is enabled, OG throws this error on group context nodes:
PHP Fatal error: Call to undefined function: node_load() in /modules/og/og.module on line 393, referer: http://mysite.com/og
If this rings any kind of bell, please share as I'm completely lost. Will do my best to improve my code.
Comments
Comment #1
SomebodySysop CreditAttribution: SomebodySysop commentedThe issue appears to be in hook_boot. Or, rather, my understanding of how it is implemented.
In 5.x hook_init, I had:
This is what we call in og_user_roles_theme():
And, it worked.
When I changed hook_init to hook_boot in 6.x, the same code fails with the "undefined function" error. Apparently, the bootstrap doesn't work for the og_set_theme() call. Hmmm...
Well, I can at least get past the problem by commenting out the line that calls og_user_roles_theme(). But, I'd like to figure out how to set the theme at this point -- and not generate a node_load failure in another module.
Thanks for any assistance.
Comment #2
SomebodySysop CreditAttribution: SomebodySysop commentedLooks like what I needed, in some format or other was something like this:
This port to 6.x is going to be a lot of fun!
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedComment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.