OG module causes my other modules (e.g. IMCE) to stop working. I've searched a lot, at the end disabling modules one by one and found out that OG causes this effect (IMCE does not react to POST info at all).
It is quite easy to find out that there is something wrong, because when enabled OG module causes the $messages at some pages to stop displaying. See e.g:
- disable OG module and enable another one, you will see the $messages info, but when OG enabled you won't see it again
- try resetting filesystem settings at http:/site.com/admin/settings/file-system - when OG disabled you will see something like "The configuration options have been reset", but when enabled you won't see it when clicking this button.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | og_user_roles.module.5.x-3.2.patch | 26.84 KB | somebodysysop |
| #6 | node_load.patch | 783 bytes | douggreen |
Comments
Comment #1
douggreen commentedIf I disable og_user_roles, the problem goes away. In og_nodeapi(op='insert'), it calls og_save_subscription(), which calls module_invoke_all('og', 'user insert') which calls og_user_roles_og(), which calls node_load(). I've run into this problem before. The problem here is that you can't call node_load() while saving a node. And since this hook_og() is called during the node save, this is a big no-no. If hook_og() might need the node, then the API should pass $node instead of $nid.
Comment #6
douggreen commentedThe quick fix is to use db_query to get the $node->type and $node->title. The longer term fix is to change the hook_og() api to pass the $node.
Comment #7
somebodysysop commentedHere's a patch to 3.1 release of OGR which includes the node_load.patch above.
Comment #8
teel commentedI'm not using og_user_roles, just a plain og module
Comment #9
douggreen commented@teel, I recommend that you start disabling other modules until you narrow down which one is causing the problem. I suspect that there is another non-og module that has made the same mistake as og_user_roles in hook_og.
Comment #10
teel commented@douggreen: yes, I already did it and this is the only module that causes such problems. I've installed a vanilla Drupal 5.7 package and just installed one non-core module which was og. When I enable it, my $messages is obscured by sth and it is not displayed. Disabling OG makes my $messages work fine. Don't you really have such problem?
Comment #11
somebodysysop commentedWell, this has been addressed from the standpoint of OGR. But, I believe it should be bounced back to OG since the individual is not using OGR and having the problem. Thanks for the patch!
Comment #12
moshe weitzman commentedI have no understanding what is requested here.
Comment #13
ajayg commentedI have OG (6.2) and IMCE 5.x-1.2 existing peacefully and working together without any problem.
Comment #14
teel commentedOk, the problem is not OG, it's Remember Me module, sorry for bothering you!