Hi,

after enabling the OG Admin module I created a new content type but was unable to see it in the drop down admin menu. After finding it using the main Drupal menu I clicked on the create link for the new content type only to get a 'you are not authorised to access this page' message- I was logged in as user one.

After disabling the module I was able to create nodes of the new content type without any problems and the create link now appeared in the drop down admin menu. Thought I'd report the bug.

Hope all is well and thanks for the great module!

Evelyn

Comments

rhymeswithcamera’s picture

I am having the exact same issue as Evelyn. It seems that you cannot see any new content type in the "Create content" menu after this module is enabled. Disabling the module restores the menu items and access to the new Create [node] page.

Taxoman’s picture

Title: You are not authorised to access this page » OG Admin conflicts with Create Content menu
Priority: Major » Critical

Sounds like a complete showstopper for using this module until fixed?
(I am looking into using it, haven't decided yet...)

nyleve101’s picture

Has anyone else experienced this issue or is it just the three of us?

Hope all is well,

Evelyn

leeaustin24’s picture

Same problem here.

Interestingly when this module is enabled it also appears to cause another 'access denied' issue with the 'add new forum topic' / 'new topic' on og forums.
Others are discussing this here: http://drupal.org/node/651672

christopherreay’s picture

I have this problem aswell

This is a problem with:
function og_content_type_admin_menu_access()

Given that ALL types are ALLOWED in SiteWide, then
else { // do normal processing plus 'allowed' check
$sql = "SELECT octa.types_allowed FROM {og_content_type_admin} octa WHERE octa.gid = -1";
$types = db_fetch_object(db_query($sql));
dsm_once("default Types", $types);
$allowed_types = unserialize($types->types_allowed);
if ($allowed_types[$type] && call_user_func_array($original_callback, $args)) {
return TRUE;
}
}

makes no sense at all
and should read:
else {
return call_user_func_array($original_callback, $args);
}

nyleve101’s picture

Hi,

thanks for looking into this christopherreay! Just to be clear where in the original code do we put your line?

Thanks again for your help!

Eve

christopherreay’s picture

Sorry it took so long for me to notice this, I must have missed the email:

The issue is that og cta does an extraneous check for "ALLOWED" for sitewide. If you look at the admin page for og cta, you can see that all the allowed checkboxes are checked for sitewide, and they are all disabled.
In fact, the list created by og cta as to which types are "ALLOWED" sitewide is created on installation of the module, so clearly any types created after installation "break".

The code I detailed shows the if block which deals with the case "which types are allowed sitewide"... I tell you what, I will make a pastebin think for it and link it here.. hold on a sec...

Here you go, a link

http://pastebin.com/bNr9YCSd

Should be clear ( maybe too clear)

nyleve101’s picture

Hi,

thanks for the thorough explanation and code- it's very much appreciated. :-)

Hope you're well and taking care of yourself.

Thanks again!

Eve

Taxoman’s picture

Version: 6.x-1.2 » 6.x-1.x-dev
Status: Active » Needs review
christopherreay’s picture

Glad I could help (if I have)
Id love to submit patches, but I dont know how to generate them

christopherreay’s picture

Oh, and btw, I got some really good meta help on how to track down the origins of this issue on #drupal, from someone really good... name obviescant