Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle 'Check for Matching Contact(s)' button with ajax #12552

Merged
merged 2 commits into from
Jul 24, 2018

Conversation

colemanw
Copy link
Member

Overview

Fixes the 'Check for Matching Contact(s)' button when ajax deduping is enabled

Before

The button would still work if ajax deduping was disabled in system prefs, but didn't work if ajax mode is enabled.

After

The button works either way. If ajax mode is enabled, clicking the button will use ajax. Otherwise it does it the old way.

@civibot
Copy link

civibot bot commented Jul 24, 2018

(Standard links)

@robfenwickuk
Copy link

I have tested the patch for this, and the button still does not work after the patch, unless AJAX Deduping is disabled. I see the same behaviour - the screen refreshes, with no alert or message. I am on 5.3.1 on Drupal 7.

@seamuslee001
Copy link
Contributor

@robfenwickuk did you ensure that you removed every line that needed removing? I tested and found it worked fine for me on a buildkit install of 5.3.1 with this patch applied

@robfenwickuk
Copy link

@seamuslee001 I must confess to being a github n00b, so what I did was go here:

https://github.com/colemanw/civicrm-core/blob/4cdfcee742776c1371ee13258f9cddd7e5187b84/templates/CRM/Contact/Form/Contact.tpl

Click raw, and then copied & pasted that to overwrite /sites/all/modules/civicrm/templates/CRM/Contact/Form/Contact.tpl in its entirety

@colemanw
Copy link
Member Author

colemanw commented Jul 24, 2018

@robfenwickuk it could be that there is some javascript error on your site which is preventing it from working. Can you try opening up the console (F12) and then go to the "New Individual" form, and click that "Check for matching contacts" button. See if any red error messages show up in your console.
Or if you like, I can log in and take a look if you want to email me login info for your site (my first name @civicrm.org is my email address)
- Coleman

@colemanw
Copy link
Member Author

Ok @robfenwickuk has been super helpful with testing out various workflows and I think we've finally got it all working. Now we've tested:

  • Create new contact: check while typing
  • Create new contact: click the check button (ajax mode)
  • Create new contact: click the check button (non-ajax mode)
  • Edit contact: check while typing (should do nothing)
  • Edit contact: click the check button (ajax mode)
  • Edit contact: click the check button (non-ajax mode)

The latest commit ensures that when editing an existing contact, they will not show up in the list of duplicates!

@colemanw
Copy link
Member Author

@robfenwickuk can you confirm that you've tested all of the above? Thanks so much for your help with this :)

@robfenwickuk
Copy link

@colemanw I can confirm I've now fully tested this and it is totally fixed. Thank you for your efforts! Much appreciated.

@eileenmcnaughton eileenmcnaughton merged commit d40f2f5 into civicrm:5.4 Jul 24, 2018
@colemanw
Copy link
Member Author

Thanks @robfenwickuk for reporting this and diligently testing. And also thanks @seamuslee001 and @eileenmcnaughton for your help.

@eileenmcnaughton eileenmcnaughton deleted the dedupe54 branch July 24, 2018 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants