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

Fatal error when merging contact records with custom file fields

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Paid Issue Queue
    • Verified?:
      No

      Description

      We have contact records with custom fields, several of which are file fields. When merging duplicate contact records we are frequently - although not always - getting a fatal error.

      The on-screen message: "sorry this service is not available".

      The relevant log entry:

      Nov 29 15:47:05  [info] $Fatal Error Details = Array
      (   
          [message] =>
          [code] =>
      )
      
      
      Nov 29 15:47:05  [info] $backTrace = #0 /home/comed/sites/default/sites/all/modules/civicrm/CRM/Core/Error.php(373): CRM_Core_Error::backtrace("backTrace", TRUE)
      #1 /home/comed/sites/default/sites/all/modules/civicrm/CRM/Core/BAO/File.php(206): CRM_Core_Error::fatal()
      #2 /home/comed/sites/default/sites/all/modules/civicrm/CRM/Dedupe/Merger.php(1637): CRM_Core_BAO_File::deleteFileReferences("51", "218", 13)
      #3 /home/comed/sites/default/sites/all/modules/civicrm/CRM/Contact/Form/Merge.php(322): CRM_Dedupe_Merger::moveAllBelongings("218", "594", (Array:24))
      #4 /home/comed/sites/default/sites/all/modules/civicrm/CRM/Core/Form.php(431): CRM_Contact_Form_Merge->postProcess()
      #5 /home/comed/sites/default/sites/all/modules/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
      #6 /home/comed/sites/default/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(61): CRM_Core_StateMachine->perform(Object(CRM_Contact_Form_Merge), "next", "Next")
      #7 /home/comed/sites/default/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Contact_Form_Merge), "next")
      #8 /home/comed/sites/default/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Merge), "next")
      #9 /home/comed/sites/default/sites/all/modules/civicrm/CRM/Core/Controller.php(351): HTML_QuickForm_Page->handle("next")
      #10 /home/comed/sites/default/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(113): CRM_Core_Controller->run()
      #11 /home/comed/sites/default/sites/all/modules/civicrm/CRM/Core/Invoke.php(286): CRM_Utils_Wrapper->run("CRM_Contact_Form_Merge", "Merge Contact", NULL)
      #12 /home/comed/sites/default/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:13))
      #13 /home/comed/sites/default/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
      #14 /home/comed/sites/default/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:3))
      #15 [internal function](): civicrm_invoke("contact", "merge")
      #16 /home/comed/sites/default/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
      #17 /home/comed/sites/default/index.php(21): menu_execute_active_handler()
      #18 {main}
      

      User reports that after a fatal error if they repeat the merge attempt it succeeds without further issues. As the issue appears not to manifest itself on every merge my assumption at this stage is that the fatal error is triggered only when certain custom file fields are populated (for example, field A might be populated in the original record and not in the duplicate, or vice versa). As I learn more on the specific circumstances that trigger the error I'll add to this issue.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              upperholme Graham Mitchell
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h