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

API v3 mailing_group event_subscribe requires unnecessary keys 'hash' and 'time_stamp'

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.4.5, 4.0.5
    • Fix Version/s: 4.1.0
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      See forum post: http://forum.civicrm.org/index.php/topic,20976.0.html

      In CiviCRM 3.4 branch (from SVN), API v3 returns the error, "Mandatory key(s) missing from params array: hash, time_stamp" when called as follows if those keys are not included in $params:

      civicrm_api('mailing_group', 'event_subscribe', $params);

      I don't think the API should be requiring these keys. Populating these keys with dummy values allows things to continue normally, though I'm not at all sure of side effects.

      If I understand this correctly, the problem seems to be that the API function is allowing DAO required fields to be considered as required, even though they're not really all required in the API context. If that's right, a patch like this might be the right solution, or at least a starting point.

      Xavier also points out that it might be better for the DAO to stop requiring those parameters altogether. If it's desirable, I can roll a patch to take out that requirement and post here for testing.

        Attachments

          Activity

            People

            • Assignee:
              pratik.joshi Pratik Joshi
              Reporter:
              allenshaw Allen Shaw
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: