lcdservices / CiviCRM-Group-Sync

Two-way synchronize CiviCRM groups with Joomla ACL groups.
4 stars 1 forks source link

don't sync groups #4

Closed marchelo2212 closed 10 years ago

marchelo2212 commented 10 years ago

Hi .. !! I use civi joomla 3.3.6 and 4.5.2 I have installed the plugin without any problem (error message). I created the rule for synchronization and save normally, but CiviCRM user is not added automatic to the appropriate group. Only is added when the user is edited and save (with or without changes). Example: Joomla ACL registered then enters the CiviCRM group: all (to bulk mail).

Why is this happening ... ?? is the componente working properly..? Best Regards Marcelo

lcdservices commented 10 years ago

I think the problem is that the plugin was not correctly installed. Can you go to the plugin manager and look for civigroupsync. If it's not there, let me know. If it is, make sure it's enabled.

lcdservices commented 10 years ago

I've uploaded a new version. please download, install, and see if it works. it fixes the plugin install problem.

marchelo2212 commented 10 years ago

I reviewed the plugin installation, is correctly but no sync automatic. I re-install the plugin but no sync all the contacts(all contacts) . The plugin synchronize the contact only when the contact profile is edited and save (without change or with changes).

This is the plugin.. civi sync

The plugin not need a configuration with cron...??

lcdservices commented 10 years ago

As I already explained on the forum, the tool does not do a mass sync of users. It only syncs when the user logs in. You should not expect all your users to immediately reflect the sync'd groups. The mechanism works on login only.

marchelo2212 commented 10 years ago

Ok... Now I understand.,.,. ;) the sync makes effect when the user log in to web page. Sorry, I have not read this Thanks..! Best regards Marcelo

marchelo2212 commented 10 years ago

I made some test, but when the user log with joomla's form, not sync with civi. The user edits the information of himself (in civi with profile) but no sync in civi (groups). The user need log with civi..? (backend) Or I need any plugin to make this connection ..?

lcdservices commented 10 years ago

I just got into one of my sandbox sites and ran some tests.

I misspoke earlier -- the syncing happens when the Joomla user is saved and when the corresponding CiviCRM contact has groups added/removed from it -- it's not triggered when the user logs in (I was confusing it with another extension I maintain).

The syncing will also happen when a rule is saved. And that is how you can bulk-update all existing users. However -- I did find a bug with that. The code needed to be slightly different for J2.5 and J3.0 dual compatibility. I've pushed up a new version that handles that. Please try and confirm.

marchelo2212 commented 10 years ago

Hi..! I edited the lines according your suggestion, now the complement is correctly, sync the users when the ruler is created or when is saved. But no sync automatic when the user is created and verified , do you know how make this...? sorry for all the questions... Best regards Marcelo

lcdservices commented 10 years ago

I think I know the problem. If you create a new user through the user manager (or frontend user registration page), that does not automatically create a civicrm contact. A contact record is not created until you login and visit a civicrm page -- at which point the contact is created and tied to the user account.

The sync tool ignores all records where there is a user account but no connected contact, or a contact but no connected user account (because there's obviously no corresponding record to connect to).

There is a Joomla plugin available that will create a linked contact when a user account is created. You could try implementing that plugin. If you do so, make sure that it is published and ordered before the group sync plugin (since we need to contact created before we attempt to sync them).

I don't know for certain if that will work. I'm just speculating that it will.