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

Deleting custom field gives fatal error - Can't DROP 'INDEX...'; check that column/key exists, 1091

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2.0
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      This error occurs if the user creates the custom field with "Searchable" = false, and then toggles "Searchable" to true. We don't create the index on the update civicrm_custom_field.is_searchable - and the delete code is expectiing an index to drop.

      We should attempt to create an index if is_searchable is togged from false to true. If the index already exists, we'll get a key exists warning which we can ignore.

      The workaround for this error is to toggle Searchable back to false - and then retry the delete field.

        Attachments

          Activity

            People

            • Assignee:
              sushant Sushant Paste
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: