1

CiviCRM 4.6.8 Wordpress 4.3 MySQL Apache/2.2.22 (Debian) Datenbank-Client Version: libmysql - 5.5.44

I've imported contacts, added new contacts, without any problem.

Then I've added a rule for individuals in "Find and merge duplicate contacts". and added following rule: "Firstname Lastname"; "supervised"; "field=LastName" "field=First Name". Saved and used the rule.

The message i've got was: "DB Error: syntax error"

Now I'm not able to add a new contact...

I've already tested this in the public demo and it didn't show an error-message.

Can someone help?

Here are the Error Details:

Sep 10 18:22:10 [info] $Fatal Error Details = Array ( [callback] => Array ( [0] => CRM_Core_Error [1] => handle )

[code] => -2
[message] => DB Error: syntax error
[mode] => 16
[debug_info] => INSERT INTO dedupe (id1, id2, weight) SELECT 0 id1, 0 id2, 0 weight LIMIT 0 GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight) [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight)' at line 1]
[type] => DB_Error
[user_info] => INSERT INTO dedupe (id1, id2, weight) SELECT 0 id1, 0 id2, 0 weight LIMIT 0 GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight) [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight)' at line 1]
[to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO dedupe (id1, id2, weight) SELECT 0 id1, 0 id2, 0 weight LIMIT 0 GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight) [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY id1, id2 ON DUPLICATE KEY UPDATE weight = weight + VALUES(weight)' at line 1]"]

)

2 Answers 2

2

This doesn't look like a Wordpress compatibility error. It is, as you guessed, related to deduplication.

It sounds like you may not have a rule designated as your "Supervised" dedupe rule - or there's a problem with the rule you have designated as your "Supervised" rule. Check to make sure you have a rule, and if you do, try changing it to the default Supervised dedupe rule. That should clear your problem. Then you can troubleshoot the dedupe rule itself.

2
  • thanks! but... can I delete a reserved rule?
    – yvose
    Commented Sep 15, 2015 at 11:43
  • You can't delete a reserved rule - or at least you shouldn't! Commented Sep 15, 2015 at 12:10
0

Experienced the same problem on CiviCRM 4.7.... Creating an Individual contact resulted in "DB Error: syntax error" message on the front end. A custom de-dupe rule had been set as the "Supervised" rule, with just a single field from a multi-record custom data set. This naturally doesn't make sense as it's a multi-value data set and could have duplicate values for a single contact.

Setting the default "Name only" rule as the "Supervised" rule resolved the issue.

Lesson learned - do not use multi value custom data set fields in "Supervised" de-dupe rules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.