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

Deleting groups with FK gives unhelpful error

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.7
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      This is a bit like the issue I reported previously on errors when deleting contribution pages. If you try to delete a group that has an FK reference, eg because it was used in a mailing, the constraint throws a scary looking CiviCRM error page. Ideally this page should read something like:

      "This group cannot be deleted because it is being used by another CiviCRM component. If you now longer wish to use this group, consider disabling rather than deleting it. If you really want to delete it, you will have to delete all the other objects (e.g. mailings) that refer to it."

      Or with a little more intelligence:

      "This group cannot be deleted because it is being used by the xxxx component ..."

      As a general point, maybe it's worth reviewing everywhere such FK "errors" might occur when they are caused by legitimate user action rather than an internal error and providing less scare error messages?

      Peter

        Attachments

          Activity

            People

            • Assignee:
              sunil Sunil Pawar
              Reporter:
              hirstp Peter Hirst
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: