Body: <p>This issue is similar to <a href="https://civicrm.stackexchange.com/questions/24496/datatables-warning-on-find-and-merge-page-upgraded-to-5-0-from-4-7-17">this one</a>. The only difference is that we are on CiviCRM 5.22.1.</p>
  <h1>Problem</h1>
  <p>The following error pops-up when use the 'Find and Merge Duplicate Contacts' page (civicrm/contact/dedupefind) then I try to search for contacts or when I modify the filters and the search input has a value:
  <a href="https://i.sstatic.net/SQBKL.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/SQBKL.png" alt="Datatables error because ajax request returns 500" /></a>
  <a href="https://i.sstatic.net/aUBt1.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/aUBt1.png" alt="The ajax request" /></a></p>
  <h1>Steps to Replicate (must have contacts with same first name and last name which <a href="https://dmaster.demo.civicrm.org/" rel="nofollow noreferrer">https://dmaster.demo.civicrm.org/</a> has)</h1>
  <ol>
  <li>Go to the Find and Merge Duplicate Contacts page (route is civicrm/contact/deduperules?reset=1 or access it via Contacts &gt; Find and Merge Duplicate Contacts).</li>
  <li>Create a new rule for detecting duplicates using their first name and last name only. I added First Name and Last Name as the fields and they have the same weight and the sum of their weights is the Weight Threshold to Consider Contacts 'Matching'. For example, weight treshold for First Name and Last Name is both 1 and the Weight Threshold to Consider Contacts 'Matching' is 2.
  <a href="https://i.sstatic.net/7iUfw.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/7iUfw.png" alt="Name only rule for finding duplicates" /></a></li>
  <li>Use the just recently created rule to look for duplicates. For the group, select 'All Contacts'.
  <a href="https://i.sstatic.net/LmD4i.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/LmD4i.png" alt="Select 'All Contacts' as the group" /></a></li>
  <li>Attempt a search using the search bar on the top right of the list of duplicates; you should get the following error.
  <a href="https://i.sstatic.net/OWnTZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OWnTZ.png" alt="enter image description here" /></a></li>
  </ol>
  <p>Is anyone else having this issue and how might we fix this?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-09T23:32:44.530Z
Comments.Text: it may be worth confirming if you can replicate this on one of the civicrm.org demo sites at the bottom of this page https://civicrm.org/demo
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-11T03:03:09.533Z
Comments.Text: Hi Pete, yeah, I tried the English demo and I do get the same exact error.
Comments.UserDisplayName: Rupert Raphael Amodia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-11T07:06:48.593Z
Comments.Text: can you add a link to the exact form you use that throws the error on eg https://dmaster.demo.civicrm.org/civicrm/contact/deduperules?reset=1 and any prior steps i need to take to replicate
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-11T19:11:40.737Z
Comments.Text: @petednz-fuzion thanks for looking into this. I've just added the steps to replicate this problem.
Comments.UserDisplayName: Rupert Raphael Amodia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-11T19:30:02.890Z
Comments.Text: your rule was still there when i tested it. i went to https://dmaster.demo.civicrm.org/civicrm/contact/dedupefind?reset=1&action=update&rgid=8 but did not see the error
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-11T19:31:24.217Z
Comments.Text: i added "ca.civicrm.logviewer" in case it can be replicated and some more info can be gleaned
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-11T19:32:10.257Z
Comments.Text: what  browser are you using (in case it might relate)
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-13T17:34:56.197Z
Comments.Text: @petednz-fuzion Chrome on Mac (Version 92.0.4515.131)
Comments.UserDisplayName: Rupert Raphael Amodia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-13T20:23:01.077Z
Comments.Text: v odd. same as me but i didn't see the Warning
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-17T23:57:09.750Z
Comments.Text: @petednz-fuzion did you put anything in the search bar? I get it as soon as I type into the search bar.
Comments.UserDisplayName: Rupert Raphael Amodia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-18T03:29:48.587Z
Comments.Text: I concur that problem exists. are you up for adding a GitLab ticket? https://lab.civicrm.org/dev/core/-/issues/
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-18T03:34:23.170Z
Comments.Text: i have mentioned it here https://chat.civicrm.org/civicrm/pl/d3z4fuq8rbyitbbsgia853eq6h
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-18T22:33:50.277Z
Comments.Text: @petednz-fuzion thanks so much! I'll submit an issue.
Comments.UserDisplayName: Rupert Raphael Amodia
Tags: <duplicate-contacts><error-page><datatables>
Title: Datatables Warning in Find and Merge Page
ThreadText: # Datatables Warning in Find and Merge Page
  
  (Asked by: username_0 on 2021-08-09)
  
  This issue is similar to [this one](https://civicrm.stackexchange.com/questions/24496/datatables-warning-on-find-and-merge-page-upgraded-to-5-0-from-4-7-17). The only difference is that we are on CiviCRM 5.22.1.
  
  # Problem
  
  The following error pops-up when use the 'Find and Merge Duplicate Contacts' page (civicrm/contact/dedupefind) then I try to search for contacts or when I modify the filters and the search input has a value:
  [![Datatables error because ajax request returns 500](https://i.sstatic.net/SQBKL.png)](https://i.sstatic.net/SQBKL.png)
  [![The ajax request](https://i.sstatic.net/aUBt1.png)](https://i.sstatic.net/aUBt1.png)
  
  # Steps to Replicate (must have contacts with same first name and last name which <https://dmaster.demo.civicrm.org/> has)
  
  1. Go to the Find and Merge Duplicate Contacts page (route is civicrm/contact/deduperules?reset=1 or access it via Contacts > Find and Merge Duplicate Contacts).
  2. Create a new rule for detecting duplicates using their first name and last name only. I added First Name and Last Name as the fields and they have the same weight and the sum of their weights is the Weight Threshold to Consider Contacts 'Matching'. For example, weight treshold for First Name and Last Name is both 1 and the Weight Threshold to Consider Contacts 'Matching' is 2.
     [![Name only rule for finding duplicates](https://i.sstatic.net/7iUfw.png)](https://i.sstatic.net/7iUfw.png)
  3. Use the just recently created rule to look for duplicates. For the group, select 'All Contacts'.
     [![Select 'All Contacts' as the group](https://i.sstatic.net/LmD4i.png)](https://i.sstatic.net/LmD4i.png)
  4. Attempt a search using the search bar on the top right of the list of duplicates; you should get the following error.
     [![enter image description here](https://i.sstatic.net/OWnTZ.png)](https://i.sstatic.net/OWnTZ.png)
  
  Is anyone else having this issue and how might we fix this?
  
  **Tags:** duplicate-contacts, error-page, datatables
  
  > **Comments:**
  > **username_1**: it may be worth confirming if you can replicate this on one of the civicrm.org demo sites at the bottom of this page https://civicrm.org/demo  
  > **username_0**: Hi Pete, yeah, I tried the English demo and I do get the same exact error.  
  > **username_1**: can you add a link to the exact form you use that throws the error on eg https://dmaster.demo.civicrm.org/civicrm/contact/deduperules?reset=1 and any prior steps i need to take to replicate  
  > **username_0**: @username_1 thanks for looking into this. I've just added the steps to replicate this problem.  
  > **username_1**: your rule was still there when i tested it. i went to https://dmaster.demo.civicrm.org/civicrm/contact/dedupefind?reset=1&action=update&rgid=8 but did not see the error  
  > **username_1**: i added "ca.civicrm.logviewer" in case it can be replicated and some more info can be gleaned  
  > **username_1**: what  browser are you using (in case it might relate)  
  > **username_0**: @username_1 Chrome on Mac (Version 92.0.4515.131)  
  > **username_1**: v odd. same as me but i didn't see the Warning  
  > **username_0**: @username_1 did you put anything in the search bar? I get it as soon as I type into the search bar.  
  > **username_1**: I concur that problem exists. are you up for adding a GitLab ticket? https://lab.civicrm.org/dev/core/-/issues/  
  > **username_1**: i have mentioned it here https://chat.civicrm.org/civicrm/pl/d3z4fuq8rbyitbbsgia853eq6h  
  > **username_0**: @username_1 thanks so much! I'll submit an issue.  
  
  ---
  
  ## 0 answers
  
  