1

Running: CiviCRM 4.7.17, WordPress 4.9.4

When an anonymous visitor tries to register for an event, we have them required to sign in or create an account via Civi's profile settings to keep our existing contact information to be relevant.

  • The profile used in the event requires a WP account
  • Duplicate Civi contact matching is set to merge with an existing contact in the profile's settings
  • I've only tried with pay later option (is there a way to use the test digital payment without being signed in? I the test option limits the test to certain users which have to be signed in to try it).
  • Existing users who sign-in don't receive the error

The anonymous user enters creates a new WP account, as required. When the user enters the name and email which matches an existing contact in Civi, they are thrown the following, DB Error: already exists instead of the intended confirmation and contact merge.

CiviCRM/WP seems to:

  • create a new contact based on their name and email instead of merging new details with the existing contact.
  • Payment (Pay later) and event registration is recorded under the existing contact.
  • Send out 2 new WP user emails. One has the username and email, the second is blank.

I've tried poking around but no results. Suggestions?

[info] $Fatal Error Details = Array (
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -5
    [message] => DB Error: already exists
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  44 , '[email protected]' ,  1353 )  [nativecode=1062 ** Duplicate entry '[email protected]' for key 'UI_uf_name_domain_id']
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  44 , '[email protected]' ,  1353 )  [nativecode=1062 ** Duplicate entry '[email protected]' for key 'UI_uf_name_domain_id']
    [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,  44 , '[email protected]' ,  1353 )  [nativecode=1062 ** Duplicate entry '[email protected]' for key 'UI_uf_name_domain_id']"] )

Update: Trying to merge the duplicate contacts made (one with name and email - another with the full profile details) returns a different DB error:

    [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -18
    [message] => DB Error: no such table
    [mode] => 16
    [debug_info] => UPDATE IGNORE civicrm_action_log SET contact_id = 1353 WHERE contact_id = 1415 [nativecode=1146 ** Table 'our_database.civicrm_action_log' doesn't exist]
    [type] => DB_Error
    [user_info] => UPDATE IGNORE civicrm_action_log SET contact_id = 1353 WHERE contact_id = 1415 [nativecode=1146 ** Table 'our_databse.civicrm_action_log' doesn't exist]
    [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::handle prefix="" info="UPDATE IGNORE civicrm_action_log SET contact_id = 1353 WHERE contact_id = 1415 [nativecode=1146 ** Table 'our_databse.civicrm_action_log' doesn't exist]"]
)

2 Answers 2

2

Maybe, you should check the profile settings, make sure you check the below input which updates the existing contact if profile finds a duplicate match -

enter image description here

1
  • Thanks for the suggestion but I already have done that. (I forgot to mention it in my post).
    – Evan
    Commented Mar 1, 2018 at 8:03
1

That second error suggests that all may not be well with the DB

Table 'our_database.civicrm_action_log' doesn't exist.

Also if I read your Q right, could there be an issue if you are creating WP Users via the Profile too if there is already a civi contact AND a WP user? I don't know WP but it may be worth testing if you have a different outcome if

a/ there is a civi contact but no WP user, and a form is submitted that 'matches' the civi contact

b/ there is a civi contact with a WP user, and a form is submitted that 'matches' the civi contact

c/ WP users are set 'off' for the profile and there is an existing matching civi contact but no WP user, and a form is submitted that 'matches' the civi contact

3
  • Thanks. The missing table is odd. And like you said there's something wrong which is probably making my moving between staging/live sites a complete mess and currently impossible. I did test it similar to your suggestions - one thing to note is this only happens when there's no linked WP user: a) Failed merge b)Failed merge c) Haven't tested I appreciate the response but I've put this issue aside to find better ways to tackle the bigger problems like missing tables and cleaning the switching of servers/testing sites... Aye.
    – Evan
    Commented Apr 9, 2018 at 9:53
  • Hi @evan , did you solve this issue? I'm experiencing right now a pretty similar scenery and can´t figure a solution. Any help would be appreciated. Thanks!
    – jmaureiram
    Commented Sep 29, 2021 at 0:57
  • 1
    don. unless yours is identical, and given this is > 3 y. old, i would open a new Question and reference this one, and of course add all the detail possible to help folk help you
    – petednz - fuzion
    Commented Sep 29, 2021 at 5:56

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.