CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Drupal 7 og_sync issues
Pages: [1]

Author Topic: Drupal 7 og_sync issues  (Read 1267 times)

Major Robot

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.0.5
  • CMS version: Drupal 7.7
  • MySQL version: 5.2
  • PHP version: 5.1
Drupal 7 og_sync issues
August 11, 2011, 02:47:53 pm
While I've been working with Drupal for a while, I'm relatively new to CiviCRM, and am evaluating it for an upcoming project.

One of my main goals is to be able to sync members of an Drupal Organic Group to a Group in CiviCRM. I've successfully installed CiviCRM 4.0.5 on my Drupal 7.7 site. I've enabled CiviCRM, OG, and CiviCRM OG Sync.

When I add a group in Drupal, sure enough, a group is added in CiviCRM, with the creator as the administrator. Perfect.

But, when I add members to the same group, they are not added to the group in CiviCRM. I've fiddled with it for a while, tried multiple groups, multiple users, multiple settings, and have had no success.

CiviCRM OG Sync should give me the functionality I want, judging by its documentation — and I can even find where it should be occurring in the code.

So, I'm wondering if I'm missing something obvious? If there's something else I should be trying, etc.?

Thanks for any help!

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Drupal 7 og_sync issues
August 11, 2011, 04:15:27 pm

I suspect this might be a bug with the Civi integration module and D7 / OG. Not sure how much has changed with the hooks for OG, but the bug might be in that part of the code

You can ping us on IRC and we can help you with the code / bug. Would be great if you can submit  a patch if you find and fix the issue

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Drupal 7 og_sync issues
August 11, 2011, 06:02:27 pm
I think eileen hs been picking up some OG synch issues - not sure if they relate to this problem though
http://issues.civicrm.org/jira/browse/CRM-8622
http://issues.civicrm.org/jira/browse/CRM-8621
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: Drupal 7 og_sync issues
August 11, 2011, 10:01:27 pm
For CiviCRM OG Sync for D7,  we have updated the code use new apis/hooks of OG but still I suspect some of the cases we are missing for drupal7, this is in my todo list, need to check whole functionality/workflow of new OG and accordingly we need to fix, it would be great someone wants to submit the patch etc.

Rajan

Major Robot

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.0.5
  • CMS version: Drupal 7.7
  • MySQL version: 5.2
  • PHP version: 5.1
Re: Drupal 7 og_sync issues
August 12, 2011, 09:16:57 am
Thanks for all the responses. Glad I'm not crazy.

I did some light debugging, and suspect the issue is in the civicrm_og_sync_og() function in civicrm_og_sync.module, line 90.

It looks like this function is intended to, among other things, add users to a CiviCRM group when hook_og() is fired. From what I can tell, hook_og() — which was called whenever a user is inserted in a group — is no longer in the OG API. (I could be wrong about that... but I can't find any reference to it in the Drupal 7 version of OG).

Since the hook's not getting fired, the only way to sync users is to directly call function — such as in civicrm_og_sync_enable() and _civicrm_og_sync_node_action(). Indeed, civicrm_og_sync_og() does get called when a new group is created (which is how the creator gets added as an admin in CiviCRM). It just also needs to be called when a user is added to a group, of course.

I realize that take on the situation is not nearly as helpful a patch, but hopefully it does shed some light.


copeasetic

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 6.x & 7.x
  • MySQL version: 5.5
  • PHP version: 5.3.27
Re: Drupal 7 og_sync issues
December 22, 2011, 02:23:50 pm
Is this still an issue in 4.0.8? I am still experiencing a sync issue as detailed in this post.

Please advise if there is a work around.


FatherShawn

  • Ask me questions
  • ****
  • Posts: 372
  • Karma: 25
    • C3 Design
  • CiviCRM version: 4.2.11
  • CMS version: Drupal 7.23
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: Drupal 7 og_sync issues
December 22, 2011, 07:21:45 pm
OG is a complete rewrite for Drupal 7.  The hooks are documented in og.api.php in the og module folder.  From reading this discussion but not the og_sync code  ;) it looks like there are helpful hooks for each stage of membership update in og...
Lead Developer, C3 Design.
Twitter: @FatherShawn

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Drupal 7 og_sync issues

This forum was archived on 2017-11-26.