Jump to content


Photo

Duplicate entry '1-2' for key 'PRIMARY'


If you have an alternate contact and try to add again the same member in the ACP a driver error shows up:
mySQL query error: INSERT INTO nexus_alternate_contacts (`main_id`,`alt_id`,`purchases`) VALUES(1,2,3)

SQL error: Duplicate entry '1-2' for key 'PRIMARY'
SQL error code: 1062
Date: Friday 14th January 2011 12:06:39 PM


 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Date: Fri, 14 Jan 2011 12:06:39 +0000
 Error: 1062 - Duplicate entry '1-2' for key 'PRIMARY'
 IP Address: 127.0.0.1 - /IP.Board/admin/index.php?adsess=079f711f656b6c6b1f7f941939dc5605&app=nexus&&module=customers&section=view&do=add_alt&member_id=1
 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 mySQL query error: INSERT INTO nexus_alternate_contacts (`main_id`,`alt_id`,`purchases`) VALUES(1,2,3)
 .--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------.
 | File                                                                       | Function                                                                      | Line No.          |
 |----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------|
 |            \IP.Board\admin\applications_addon\ips\nexus\modules_admin\customers\view.php| [db_main_mysql].insert                                                        | 132               |
 '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------'
 |            \IP.Board\admin\sources\base\ipsController.php                  | [admin_nexus_customers_view].doExecute                                        | 286               |
 '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------'

The code never checks if you already have the member before adding it.


Also it seems a bit annoying that you need to delete an alternate contact and re-add it again to add more packages. Can we add an edit option in the future possibly?

Status: Fixed
Version:
Fixed In: 1.4.0


3 Comments

Updating severity to: 2 - Fair
Updating status to: Confirmed - Admin CP General
Have fixed, but am flagging so we can add an edit interface
Updating status to: Flagged For Future Version