Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.4
    • Fix Version/s: 4.7.5
    • Component/s: CiviPledge
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Core Team Funds

      Description

      I have localized (Russian) CiviCRM installation. When I try to cancel a pledge, nothing happens. In log I see
      Notice: Undefined index: Cancelled in CRM_Pledge_BAO_Pledge::cancel() (line 1114 of <website root>/sites/all/modules/civicrm/CRM/Pledge/BAO/Pledge.php).
      In than line I see:
      $statuses = array_flip(CRM_Contribute_PseudoConstant::contributionStatus());

      function CRM_Contribute_PseudoConstant::contributionStatus defined in file CRM/Contribute/PseudoConstant.php, line 311 this way:
      public static function &contributionStatus($id = NULL, $columnName = 'label')

      But column 'label' of contribution status contains localized (in my case Russian) label, so this function fails to find status with label 'Cancelled'.

      I managed to cancel plegde by changing line 1114 of CRM/Pledge/BAO/Pledge.php to
      $statuses = array_flip(CRM_Contribute_PseudoConstant::contributionStatus(NULL,'name'));
      because column 'name' of contribution status contains non-localized status name. It might be better to change function definition to
      public static function &contributionStatus($id = NULL, $columnName = 'name')
      but I cannot research all concequences of such a change.

        Attachments

          Activity

            People

            • Assignee:
              yashodha Yashodha Chaku
              Reporter:
              fkhodkov Fedor Khodkov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: