I am getting this error on installing OG subgroup module, can some one help pl
Notice: Use of undefined constant OG_REQUIRED_CTOOLS_API - assumed 'OG_REQUIRED_CTOOLS_API' in og_subgroups_ctools_plugin_directory() (line 13 of E:\wamp\www\sites\all\modules\og_subgroups\og_subgroups.module).

Comments

pancho’s picture

Category: support » bug

This constant has been removed as part of major reworkings in the OG 7.x-2.x branch, which is still in dev state anyway. However, OG-Subgroups remains compatible with OG 7.x-1.x.

deanflory’s picture

I too receive the error:

Notice: Use of undefined constant OG_REQUIRED_CTOOLS_API - assumed 'OG_REQUIRED_CTOOLS_API' in og_subgroups_ctools_plugin_directory() (line 13 of /home/account/public_html/drupal/sites/all/modules/og_subgroups/og_subgroups.module).

kaizerking’s picture

same problem here:
Notice: Use of undefined constant OG_REQUIRED_CTOOLS_API - assumed 'OG_REQUIRED_CTOOLS_API' in og_subgroups_ctools_plugin_directory() (line 13 of /hsphere/local/home/sapguroo/erpfreelancers.com/sites/all/modules/og_subgroups/og_subgroups.module).

Richard_1618’s picture

same problem here:
Notice: Use of undefined constant OG_REQUIRED_CTOOLS_API - assumed 'OG_REQUIRED_CTOOLS_API' in og_subgroups_ctools_plugin_directory() (line 92 of /home/projectc/public_html/sites/all/modules/og_subgroups/og_subgroups.module).

fbouzek’s picture

Priority: Normal » Major

Any ideas? This is still present in 7.x-2.x-rc1

fehin’s picture

Same issue with 7.x-1.x-dev.

jlea9378’s picture

I'm also getting this error. Is there a fix? The dev release is very old...

Notice: Use of undefined constant OG_REQUIRED_CTOOLS_API - assumed 'OG_REQUIRED_CTOOLS_API' in og_subgroups_ctools_plugin_directory() (line 13 of /home/clients/websites/w_comm7/public_html/comm7/sites/all/modules/og_subgroups/og_subgroups.module).

pdeclarens’s picture

I experience the same problem with all versions available.
If I try to install the ctools module I get a fatal error.

In all cases I am unable to create a subgroup (option is not offered0

thanks for your help

scottalan’s picture

StatusFileSize
new655 bytes

Please know that this is not the proper way to submit a patch per: http://drupal.org/patch/submit but I'm in a hurry and I needed this as well so a simple fix.

Assuming the version of ctools is still valuable to the og_subgroup module then I just did the following. Like I said...not the 'proper' way but when I have more time I will re-roll.

pdeclarens’s picture

thanks for your help, but despite research to finc how install a patch... I did not succeed..
Win32

pdeclarens’s picture

Assigned: Unassigned » pdeclarens

could you be more precise to where and how this patch must be used

thanks

brightbold’s picture

@pdeclarens: If you read the patch you can see near the top that the patch is for og_subgroups.module. Two good resources for applying patches are http://drupal.org/patch/apply and http://drupal.org/node/60179. When I was on Windows I used NetBeans, which is free and made it pretty easy. If you're having trouble getting it to automatically apply using the instructions above, this is a small patch so would be easy to apply manually (copy-paste FTW!). The instructions on how to do that are here: http://drupal.org/node/534548. While it's not the fastest way to do it, it does help you understand the structure of a patch, which I found made it easier to start applying them mechanically because I understood what was going on.

pdeclarens’s picture

@BrignyBold: many thanks for info. The patch is now installed ans I have no more warning messages.

This will most shurely be usefull for me in other circonstances!

I am still with a sub-goup configuration problem...

When I go to configuration/Organic groups, I fing noting like sub-groups...

If I create a new group, no option to create ir as a sub group...
I tried to make a view but I get a message "main fiels is invalid"
and a notice " Undefined index in theme_views_tree() (line 59 \views_tree.module)

I did not find a tutorial to configure subgroups...
thanks in advance

pdeclarens’s picture

Status: Active » Fixed

I found a post with the solution ...

After the patch is corectly installed,

Just create a new content type, lets call it "subgroup" in the organic group tab make shure that OG should treat this content as "Group"

Then use add content/subgroup, in the title give the name you want lets say "manager" and in the Your groups list just choose the group where you want your subgroup to belong.

I hope this will help others!

brightbold’s picture

Assigned: pdeclarens » Unassigned
Status: Fixed » Active

@pdeclarens — Glad that helped you! For future reference, if you assign the issue to yourself, that means you're taking responsibility for fixing the problem! Also, it shouldn't be marked fixed until a patch had been reviewed and committed to the module, so I've set the status back to "active."

(Once @scottalan has a chance to reroll a proper patch then he'll presumably set it to "needs review," and when enough people have tested it, someone will change it to "reviewed & tested by the community." Only after those two statuses does it go to "fixed.")

pdeclarens’s picture

thanks for the presision, I was under the idea that Assigned was just to make it appear in my dashboard!

Sorry if this has been of any inconvinience.

pdeclarens’s picture

version used is (commons-7.x-3.0-beta2)

new installation

OG_subgroup patched...

just after un run cron: the new message

Notice: Undefined property: stdClass::$gid in og_subgroups_og_user_access_alter() (line 99 of /homepages/42/d141549472/htdocs/ema/commons/sites/all/modules/og_subgroups/og_subgroups.module).

this time line 99 is concerned!

log gives this information:
Type cron
Date Saturday, March 16, 2013 - 08:40
User Anonymous (not verified)
Location http://ema.adret.eu/?q=admin/reports/status/run-cron
Referrer http://ema.adret.eu/?q=admin/reports/status
Message EntityMetadataWrapperException: Invalid data value given. Be sure it matches the required data type and format. in EntityMetadataWrapper->set() (line 122 of /homepages/42/d141549472/htdocs/ema/commons/profiles/commons/modules/contrib/entity/includes/entity.wrapper.inc).
Severity error
Hostname 2.9.174.41
Operations

file cannot be attached because of extension
line 119 to 130 reads:

*/
public function set($value) {
if (!$this->validate($value)) {
throw new EntityMetadataWrapperException('Invalid data value given. Be sure it matches the required data type and format.');
}
$this->clear();
$this->data = $value;
$this->updateParent($value);
return $this;
}

/**

thanks for your help!

marcoscano’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.05 KB

Patch in #9 rerolled and tested.
For me everything works fine after applying it.

Note:
I ended up here because before applying the modifications in the constant, I had a WSOD with fatal:
PHP Catchable fatal error: Argument 2 passed to SelectQuery::fields() must be of the type array, null given, called in /var/www/project/includes/entity.inc on line 317 and defined in /var/www/project/includes/database/select.inc on line 1301

It's not very clear the relation between the two, but if you are having these errors try applying this patch, which in my case solved both problems.

mpotter’s picture

Status: Needs review » Reviewed & tested by the community

This looks good to me.

mpotter’s picture

Priority: Major » Normal
Status: Reviewed & tested by the community » Needs work

No wait. The patch seemed ok (except it was run in the wrong directory!) But when I tried to commit this, I couldn't find a reference to OG_REQUIRED_CTOOLS_API anywhere. There isn't any og_subgroups_ctools_plugin_directory() function anymore.

Looks like this was for the old 1.x branch and I was looking at the 2.x branch. So marking this as "Needs work" to get a patch that is created from the proper base directory, but recommend that people should be using the 2.x branch anyway.