When viewing "Content types" tab on group home page (
/ogct).

Under function og_content_type_admin_owner(&$form_state, $nid)
"warning: Invalid argument supplied for foreach() in og_content_type_admin/og_content_type_admin.module"

On line 644~
$activated_status = unserialize($result->types_active);
foreach ($assigned as $type => $value) { //Error here

From debugging, $result->types_allowed is null

Reliably occures when my "Default" og content type has no selection in it. In my case, the default set is the only set there is.

To fix, possibly enforce at least one content type to be selected, or just throw a clean error message that links to the default set configuration.

Comments

RoboPhred’s picture

Once I added and removed an entry from the "Default" group, this error no longer shows up, probably because it now has a non-null value in types_allowed. Perhaps the solution is that the install should initialise the types_allowed entry.