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

During delete of price set option OR field - list of related Events and / or Contribution pages not displayed with status message due to mistake in variable naming

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.1.2
    • Component/s: CiviContribute, CiviEvent
    • Labels:
      None

      Description

      When attempting to delete a price set option for a price set that is "in use" - we give the user a status message AND the code is supposed to display a list of the 'used by' Events and / or Contrib pages.

      However, a regression bug was introduced in r24981 and the user only sees this message - but NO table of Events / Contribution pages:

      "Unable to delete the 'Senior 2' Price Field Option - it is currently in use by one or more active events or contribution pages or contributions. If you no longer want to use this Price Field Option, click the event title below, and modify the fees for that event."

      http://fisheye2.atlassian.com/browse/CiviCRM/branches/v3.1/templates/CRM/Price/Page/table.tpl?r=24981

      I think the problem is that the parent tpl - templates/CRM/Price/Page/Option.tpl defines $context, but table.tbl is looping on $contexts which doesn't seem to be defined. It looks like this rev was never tested since I don't think it can work as coded. An array var would need to be defined to handle possibility of both Events and Contribution pages using the price set.

      Also, part of the status message is repeated between Option.tpl and table.tpl. Lines 41 and 46 in Option.tpl should probably be removed, since that text is provided in table.tpl.

      SAME bug is also present when trying to delete Price Set FIELD for a price set that is 'usedBy' Event or Contribution page.

        Attachments

          Activity

            People

            • Assignee:
              priya Priya Prajapati
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: