once install i18n, whenever Organic Group user role can't create node it only got this message "Access denied
You are not authorized to access this page." if i remove i18n module, OG user role work.
Using
Drupal 6.16
Organic groups 6.x-2.x-dev (2010-Apr-17)
OG User Roles 6.x-4.x-dev (2010-Mar-11)
Internationalization 6.x-1.x-dev (2010-May-08)

Is there anyway to solve this. My site require multilanguage with OG.

Comments

wdouglascampbell’s picture

I also need this.

wdouglascampbell’s picture

What appears to be happening is that when node_load is called by the og_user_roles init process (which is trying to update the user role information) one of the functions that ends up being called is db_rewrite_sql(). This function invokes all the rewrite_sql functions of all modules of which i18n is one of. i18n_rewrite_sql() calls i18n_selection_mode() which in turns ends up calling menu_get_object() which calls menu_get_item().

The problem is that menu_get_item() is called BEFORE the user's role information has actually been updated and so unless the user has site-wide permissions to create the node, that router_item will be mark as not accessible. Since menu_get_item() stores all router_items in a static variable and does not provide a means for regenerating the router_item, we are stuck with the access denied message given :(

I have provided a patch that does appear to fix this issue for me taking the above into account. For details see #770870: Access denied when creating node if restricted to a role assigned by og_user_roles and i18n is enabled.

mparker17’s picture

Status: Active » Closed (duplicate)

It seems that the original issue described in #770870: Access denied when creating node if restricted to a role assigned by og_user_roles and i18n is enabled is a duplicate of this one (see comment #21 for clarification).