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

Priceset upgrade error - DB Error: already exists

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: None
    • Labels:
      None

      Description

      Check http://forum.civicrm.org/index.php/topic,25718.0.html for more details.

      Problem seems to be - that the name column of priceset table being computed, is not able to ensure uniqueness.

      Currently a random function is used to ensure uniqueness:

      $pageTitle . '_' . rand(1, 99);

      But this fails to maintain uniqueness for say large number of events or contribution-pages with same title ( and also because output of rand() could repeat ).

      A good solution would be using a timestamp.

        Attachments

          Activity

            People

            • Assignee:
              pradeep.nayak Pradeep Nayak
              Reporter:
              deepak Deepak Srivastava
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: