I keep getting this error Fatal error: Call to undefined function og_is_group_post_type() in <>modules/user_relationships/user_relationship_node_access/user_relationship_node_access.module on line 132, when i try to create a new group, or some of my group content types. I don't know if it is User Relationships or something else thats causing this error.

If i try to go to a group I get this error;

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IN ('1')) AND (.group_audience_gid = '1') ))) subquery' at line 1: SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM {users} users WHERE (( (users.status <> :db_condition_placeholder_0) AND (.group_audience_state IN (:db_condition_placeholder_1)) AND (.group_audience_gid = :db_condition_placeholder_2) ))) subquery; Array ( [:db_condition_placeholder_0] => 0 [:db_condition_placeholder_1] => 1 [:db_condition_placeholder_2] => 1 ) in views_plugin_pager->execute_count_query() (line 140 of /ifi/midgard/p08/vifi/www_docs/modules/views/plugins/views_plugin_pager.inc).

I don't know what to do about this, so I hope someone can help me.

CommentFileSizeAuthor
#7 fix_og_integration.patch1.34 KBberdir

Comments

gurojoh’s picture

Status: Active » Closed (fixed)

I found out what was wrong.

berdir’s picture

Status: Closed (fixed) » Active

And that was what exactly? ;)

This code is a left-over from the D6 version, it needs to be removed. The second error looks like a views issue, though.

jacov’s picture

/modules/user_relationships/user_relationship_node_access/user_relationship_node_access.module on line 132

CHANGE FROM:

$is_group_post = module_exists('og') && og_is_group_post_type($form['type']['#value']);

CHANGE TO:

$is_group_post = module_exists('og');

that should do the trick,
JB

berdir’s picture

That is not the same thing, that will automatically assume that all content types are groups, we need a replacement for the og_is_group_post_type function.

Celeste’s picture

Hey

Newbie here - I'm getting the same issue. After installing the relationship module and then enabling it, I got:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY rtid, rid' at line 1: SELECT rtid, rid FROM {user_relationship_type_roles} WHERE rtid IN () ORDER BY rtid, rid; Array ( ) in user_relationships_types_load() (line 79 of /var/www/vhosts/my-site.co.za/httpdocs/modules/user_relationships/user_relationships_api/user_relationships_api.api.inc).

I haven't been using drupal for long and my knowledge is limited - so if someone could help - please provide step-by-step instructions.

Thanks in advance.

berdir’s picture

Category: support » bug

That is a different bug, please open a new issue.

berdir’s picture

Status: Active » Needs review
StatusFileSize
new1.34 KB

Attaching patch, please test.

BenK’s picture

Subscribing to help with testing.

Anonymous’s picture

I just had this, patch in #7 worked for me

berdir’s picture

Status: Needs review » Fixed

Thanks for testing, commited.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.