Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 913
    • Issues 913
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #329

Closed
Open
Opened Aug 15, 2018 by varshith@varshith

'Api error: DB Error: already exists' on drush cc civicrm and any extension enable/disable

Overview

'Api error: DB Error: already exists' on drush cc civicrm and any extension enable/disable on a fairly new site.

Technical Details

On drush cc civicrm and any extension enable/disable.

CRM_Core_ManagedEntities::reconcile() is called and this method tries to re create a relationship-type that already exists.

On looking into more, it was an issue with core Case XMLProcessor. Case ManagedEntities checks all Case types and their XML definition and then checks to see if all relationship types used within the case types needs to be created/updated.

Here on checking the relatoinship types between case type XML definition and all relationship types, there is a mismatch in the field used to compare them. The "label_b_a" field is compared with "name_b_a" and so if these two are not the same (there is no need to be) it tries to re create it and results in this error.

Edited Aug 15, 2018 by varshith
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
5.20.0
Milestone
5.20.0
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#329