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

CRM_Campaign_BAO_Petition::checkSignature references non-existent column civicrm_activity.source_contact_id

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.4
    • Fix Version/s: 4.4.0
    • Component/s: CiviCampaign
    • Labels:
      None

      Description

      Upon signing a custom petition at URL, http://localhost/civicrm/petition/sign?sid=1, I encountered a DB exception stating that the column civicrm_activity.source_contact_id does not exist. Upon inspecting CRM_Campaign_BAO_Petition::checkSignature (line 471 in CRM/Campaign/BAO/Petition.php), and the table definition, there is a hard-coded mismatch between the code and the table.

      I am running off the master Github branch.

      The exception message is: "Unknown column 'a.source_contact_id' in 'field list'"

      mysql> describe civicrm_activity;
      -----------------------------------------------------------------+

      Field Type Null Key Default Extra

      -----------------------------------------------------------------+

      id int(10) unsigned NO PRI NULL auto_increment
      source_record_id int(10) unsigned YES MUL NULL  
      activity_type_id int(10) unsigned NO MUL 1  
      subject varchar(255) YES   NULL  
      activity_date_time datetime YES   NULL  
      duration int(10) unsigned YES   NULL  
      location varchar(255) YES   NULL  
      phone_id int(10) unsigned YES MUL NULL  
      phone_number varchar(64) YES   NULL  
      details text YES   NULL  
      status_id int(10) unsigned YES   NULL  
      priority_id int(10) unsigned YES   NULL  
      parent_id int(10) unsigned YES MUL NULL  
      is_test tinyint(4) YES   0  
      medium_id int(10) unsigned YES MUL NULL  
      is_auto tinyint(4) YES   0  
      relationship_id int(10) unsigned YES MUL NULL  
      is_current_revision tinyint(4) YES MUL 1  
      original_id int(10) unsigned YES MUL NULL  
      result varchar(255) YES   NULL  
      is_deleted tinyint(4) YES MUL 0  
      campaign_id int(10) unsigned YES MUL NULL  
      engagement_level int(10) unsigned YES   NULL  
      weight int(11) YES   NULL  

      -----------------------------------------------------------------+
      24 rows in set (0.00 sec)

        Attachments

          Activity

            People

            • Assignee:
              ravish.nair Ravish Nair
              Reporter:
              mmikitka Matt
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: