CRM-10932 PCP setIsActive/sendStatusUpdate does not load page title & block ID if the PCP is an event type PCP

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.2, 4.2.1
    • Fix Version/s: 4.2.3
    • Component/s: CiviContribute, CiviEvent
    • Labels:

      Description

      Regarding this file: CRM/PCP/BAO/PCP.php

      The 4th parameter of the 'sendStatusUpdate' function has a default value of 'contribute'. When the 'setIsActive' function calls it, it does not explicitly set this paramater. In the case of event type PCPs this causes the $contribPageTitle and the $blockId to not set properly. This causes an email to get sent out with part of the subject line missing and a broken link due to the blockId query parameter not being set.

      This should fix the problem:

      Index: CRM/PCP/BAO/PCP.php
      ===================================================================
      — CRM/PCP/BAO/PCP.php (revision 1)
      +++ CRM/PCP/BAO/PCP.php (working copy)
      @@ -560,13 +560,14 @@
      CRM_Core_DAO::setFieldValue('CRM_PCP_DAO_PCP', $id, 'status_id', $is_active);

      $pcpTitle = CRM_Core_DAO::getFieldValue('CRM_PCP_DAO_PCP', $id, 'title');
      + $pcpPageType = CRM_Core_DAO::getFieldValue( 'CRM_PCP_DAO_PCP', $id, 'page_type' );
      $pcpStatus = CRM_PCP_PseudoConstant::pcpStatus();
      $pcpStatus = $pcpStatus[$is_active];

      CRM_Core_Session::setStatus("$pcpTitle status has been updated to $pcpStatus.");

      // send status change mail

      • $result = self::sendStatusUpdate($id, $is_active );
        + $result = self::sendStatusUpdate($id, $is_active, FALSE, $pcpPageType );

      if ($result) {
      CRM_Core_Session::setStatus("A notification email has been sent to the supporter.");

        Attachments

          Activity

          [CRM-10932] PCP setIsActive/sendStatusUpdate does not load page title & block ID if the PCP is an event type PCP
          There are no comments yet on this issue.

            People

            • Assignee:
              Yashodha Chaku
              Reporter:
              Ian

              Dates

              • Created:
                Updated:
                Resolved: