-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apiv3 #214 V2.0 biggie #216
apiv3 #214 V2.0 biggie #216
Conversation
@artfulrobot thanks. We 'll run some manual tests and come back with questions or feedback. |
I am trying the basic example with one group with contacts in CiviCRM and empty mailchimp list and CiviCRM to Mailchimp Sync. I could not get sync button / Dry-Run. Please help on this |
Initial checks:
I will try on a fresh installation of 4.6 to see if I can replicate the problem you're having. |
…ccess config screen, and warning from curlopt
I've squished a few bugs based on running it with a fresh 4.6.18 install. But I still can't reproduce the behaviour you're seeing. I've also installed a fresh 4.7.8 install and that seems to be running fine. |
@artfulrobot The above returns only 10 results. I have 12 in my case, might be checking pager information Thanks |
Thanks. Try that. |
@artfulrobot [Error: List 0 Newsletter: Completed additions/updates/unsubscribes.] Thanks |
OK, how did you enter an invalid email into CiviCRM? I'll build a test. |
@artfulrobot Response Body: stdClass::__set_state(array( |
Oh ok, so we need to protect against Mailchimp failures on small updates. Will write test. |
(1) I have another issue. Please see below. I have a list with one group under list in mailchimp However I updated newly added subscriber to group under list in mailchimp, I expected this subscriber added to my civicrm child group under membership group. It did not happen Then I did civi to mailchimp sync, this sync removed newly added subscriber from group under list in mailchimp - This is not expected. But other way it works fine. I have a contact in membership group and child group in CiviCRM and removed this contact from child group. This action removed from group under list in mailchimp. When I rejoin to this child group back, also add to group under list in mailchimp. (2) Thanks |
@Kajakaran Can you clarify, I'm not quite sure I follow. Nb. it might be helpful if we can agree to use these terms:
As I understood your question: At Mailchimp: List 1 has Interest A in a Mailchimp Group/Interest Category At CiviCRM:
I would expect the webhook to make that happen. Note that webhooks are not necessarily fired immediately, and that on a profile update there is an additional 10s delay on profile updates. I have not tested an interest group as a child group of the membership group - trying that now - but certainly if the Interest Group is just a regular group (no parents) then the webhook deals with this case and adds the Contact to the Interest Group.
That is expected because of your result in the first part of the test: A CiviCRM to Mailchimp sync assumes CiviCRM is correct. As CiviCRM does not think that the Contact is in the Interest Group (you said as much above), then it makes sure that Interest is unset at Mailchimp. So the question is your first one: what happens with Interest Group as a child of Membership Group? I'm trying to re-create that now. It's v frustrating that the Mailchimp web interface lags updates made by the API significantly. I'm having to wait about 5 minutes before changes made (and verifiable) by the API are shown online. Refresh Page...Wait...Refresh Page...Wait.... |
Actually this might be a Mailchimp bug. (I've found a few). I've just updated the interest at mailchimp.com and the profile webhook has not been called. (not that my code is failing; but that the webhook request is not being made at all - nothing in web server logs!) I had this problem with the Subscribe button on the mailchimp website. Eventually after a long time with support they confirmed it was a bug their end. I'll ask them. |
@artfulrobot "Group 2 is an Interest Group. And is a child group of the Membership Group?" Thanks |
Yeah, then that works for me. (It also seems to work for child groups.) Coming back after lunch I can see that Mailchimp's webhooks have finally fired! All of them at once! About 20 mins after I made changes on Mailchimp.com So if you could repeat your test: Change the Interest at Mailchimp, then wait on Mailchimp to bother sending the webhook to your server, then check your CiviCRM handled it right - I think it should work. Do use the lastest updated version though (i.e. from the current HEAD of my master branch which includes the commits above.). |
Does this patch fix the error Invalid MailChimp List ID: e33355b9f6 that I get when I try to access the Mailchimp settings from Civicrm? |
@vishram74 by "this patch" do you mean this whole Pull Request or a specific commit? This PR is for testers only at the mo. You can try it but it introduces forward-only changes (so you can't downgrade to the current version without some technical work and reconfiguring all your lists). The settings page checks have been rewritten, so you should get more meaningful errors, like "the list that this group linked to no longer exists at Mailchimp", if that's the case, but without more details (and here's probably not the place for them) I couldnt's say more. If you are in a position (i.e. you are a developer, know about backups...) to test the master branch of my fork (i.e. this PR) then please do report any specific problems here, as Kajakaran has been and I'll try to help. |
This issue Im getting is when I try and access the page https://fremantlechamber.com.au/civicrm/mailchimp/settings?reset=1 Im getting an error shown below Im not a developer.. Just configure civicrm for our clients so Im probably not he best person to test this. Thanks anyway for your help |
You could open an issue here. Whether it gets a fix on the current branch will depend on whether this PR gets accepted. Hope so after the more than 100 hours work that's been put in, but more testing is needed by the devs before that can happen. |
@artfulrobot Please see civi logs Jun 16 14:08:59 [info] End-CRM_Mailchimp_Utils getGroupsToSync $groups Jun 16 14:08:59 [info] Webhook: profile with request data: {"type":"profile","fired_at":"2016-06-16 14:05:38","data":{"id":"ea3bc030e4","email":"kajanonemoregopi@vedaconsulting.co.uk","email_type":"html","ip_opt":"185.53.226.156","web_id":"285503445","merges":{"EMAIL":"kajanonemoregopi@vedaconsulting.co.uk","FNAME":"kajanonemoregopi","LNAME":"kajanonemoregopiln","INTERESTS":"Group 1","GROUPINGS":[{"id":"12001","name":"Grouping","groups":"Group 1"}]},"list_id":"a51d9b170b"}} Jun 16 14:09:10 [info] Webhook response code 200 (200 = ok) |
@Kajakaran Looks like you have configured your CiviCRM group to disallow updates from Mailchimp: see in your logs: Check the settings in Civi for that group. You want the option "Subscribers are able to update this grouping using Mailchimp". |
@artfulrobot Thanks |
:-D |
Have merged in. Any API v2 or new work would continue to go in master, while any critical fixes for v1 should go to API-v1 branch. Many Thanks @artfulrobot. |
Here's a rather big patch. It's called v2 because it's in many ways a rewrite and introduces forward-only changes.
It comes with lots of documentation (updated README.md, new README-tech.md, and lots in code) and lots of tests (71 tests, 622 assertions).
It began life as a way to move to Mailchimp's API v3.0 which is going to be the only way to talk to Mailchimp from the end of 2016 on.
I'm getting good results in my real-world use case (a simple case with ~5,000 subscribers) but it could do with wider testing.
I'm really keen to get test cases written for any problems and to check all existing tests still pass before changes are accepted
There are a couple of issues outstanding to my mind: Mailchimp's re-subscribe policy (see README.md) and currently we cannot check for errors on the bulk updates. The latter is because Mailchimp's new batch API only offers feedback in a gzipped tar file and then only in a particular format that PHP's PharData class is unable to open...
Also I think it fixes
Possibly fixes