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

Mark this pair as not a duplicate never completes in contact/merge

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.3.1
    • Fix Version/s: 3.3.3
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      When looking at a pair of contacts to potentially merge on the page contact/merge one option presented is to "Mark this pair as not a duplicate."

      However when this is clicked, and after clicking "OK" to the pop-up dialog box, the page immediately starts reloading to a different page, typically dedupefind?reset=1&rgid=4&action=browse.

      Checking the dedupe_exception table, the new row never gets written.

      So two problems:

      1. It redirects to a VERY undesirable page (the list of potential duplicates sometimes takes 3-4 minutes to load)
      2. It doesn't save the exception

      I tried this on the demo site and could not replicate it.

      However I think the reason is that the demo site is speedy and has a very small database.

      On our production site, with a fairly large DB and slower response time, the ajax request goes out to write to dedupe_exception and before it can complete, the page redirects to the very slow-loading list of potential duplicates. The page redirect interrupts the ajax request and it never completes.

      I was able to fix the problem by introducing a delay before the page reload (Dedupe.tpl about line 42):

      if ( context == 'merge-contact' && reloadURL ) {
      //wait 4 seconds to allow the ajax to finish up before leaving the page
      function relocate ()

      {window.location.href = reloadURL;}

      setTimeout(function ()

      {relocate();}

      , 4000);

      }

      This is probably not the ideal solution--the 4 second delay may or may not be enough depending on circumstances. Ideally it would present you with a message saying the contacts had been marked as non-duplicates and then you would be allowed to go wherever you want.

      The return URL is set to {$userContextURL} (Merge.tpl around like 36). This usually seems to be dedupefind?reset=1&rgid=4&action=browse or some variant, regardless of the context.

      If it must redirect, something like /civicrm/contact/deduperules&reset=1 is a much better choice.

        Attachments

          Activity

            People

            • Assignee:
              ashwini Ashwini Poharkar
              Reporter:
              bhugh Brent Hugh
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: