Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-18075

Profile submit API call does not add contact to goup or send opt-in email

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      Developer Doc
    • Funding Source:
      Needs Funding

      Description

      When using the AJAX interface to perform a "profile submit" API call to add a contact to a mailing list, the contact is created but not added to the group and no opt-in email is sent.

      The call is performed as follow, from a Joomla custom content module :

      CRM.api3('Profile', 'submit', {
          "profile_id":    20,
          "email-Primary": 'someone@somewhere.com'
      }).done(function(result) {
          console.info(result);
      });
      

      Both the profile "Add new contacts to a Group" and CiviMail "Enable Double Opt-in for Profiles which use the Add to Group setting" are set.

      It does work when using the HTML form snippet from the profile (contact created, added to group and opt-in email sent), but not when using the AJAX API call.

      This has been lightly discussed in CRM-13234, but there is no documentation on how to get the profile submit API to add a contact to a group and send opt-in emails.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Mathieu Mathieu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: