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.

Comments

douggreen’s picture

If 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.

douggreen’s picture

Project: Organic Groups » OG User Roles
Version: 5.x-7.2 » 5.x-2.8
Component: og.module » Code
Status: Active » Needs review
StatusFileSize
new783 bytes

The 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.

somebodysysop’s picture

Version: 5.x-2.8 » 5.x-3.1
Assigned: Unassigned » somebodysysop
StatusFileSize
new26.84 KB

Here's a patch to 3.1 release of OGR which includes the node_load.patch above.

teel’s picture

I'm not using og_user_roles, just a plain og module

douggreen’s picture

@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.

teel’s picture

@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?

somebodysysop’s picture

Project: OG User Roles » Organic Groups
Version: 5.x-3.1 » 5.x-7.2
Component: Code » og.module
Assigned: somebodysysop » Unassigned

Well, 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!

moshe weitzman’s picture

Status: Needs review » Postponed (maintainer needs more info)

I have no understanding what is requested here.

ajayg’s picture

I have OG (6.2) and IMCE 5.x-1.2 existing peacefully and working together without any problem.

teel’s picture

Priority: Critical » Minor
Status: Postponed (maintainer needs more info) » Closed (won't fix)

Ok, the problem is not OG, it's Remember Me module, sorry for bothering you!