veda-consulting-company / uk.co.vedaconsulting.mailchimp

Other
22 stars 43 forks source link

Mailchimp API won't pass test and save in CiviCRM 4.6.34 using extension version 2.01 #300

Open jrmatson opened 6 years ago

jrmatson commented 6 years ago

I recently updated our installation of the Mailchimp extension from version 2.0 to 2.01 . It appears that the upgrade wiped out the Mailchimp API value from the Mailchimp Settings screen in CiviCRM and now that screen won't "Test and Save" any API value.

I ensured that the API value from Mailchimp is the one that I am pasting into the CiviCRM screen. I tried creating a new API key at Mailchimp and using that in the CiviCRM screen. No luck.

I consistently get the error: "Cannot use the Mailchimp API - API key required. You will see this message if you have not yet configured your Mailchimp account."
"API key required"

We are using CiviCRM 4.6.34 installed on Drupal 7.56. We have been using the extension successfully for a couple of years.

jrmatson commented 6 years ago

Correction We are on CiviCRM v4.6.34 not version 3.6.34

rubofvil commented 6 years ago

I have the same problem in the 4.6.21.

I think that the problem is the replace "CRM_Core_BAO_Setting::getItem" with the api (get setting) https://github.com/veda-consulting/uk.co.vedaconsulting.mailchimp/blob/v2.0.1/CRM/Mailchimp/Utils.php#L639

I tried directly the api call in CiviCRM and it's not getting the Items from the extension $result = civicrm_api3('Setting', 'get', array(....

Make sense to revert this commit? https://github.com/veda-consulting/uk.co.vedaconsulting.mailchimp/commit/e26b8b35f2f51a06b589129b14ee5ef9730ada73#diff-2bb1e6aff90f29cd61dbaf1e4344a530

Or maybe know why is failing the api

veda-consulting commented 6 years ago

@rubofvil @jrmatson I think the best thing to do is establish why the API isn't working. We're only ensuring 4.7 compatibility going forward. Alternative is if someone wants to write some code to check the version of CiviCRM and deciding which call to make after that?