Jump to content

email duplicate entry in error log


fairtomidland

Recommended Posts

Error log showing errors for all new orders since updating to CC5.08-

File: [user.class.php] Line: [335] "INSERT INTO `CubeCart_customer` (`title`,`first_name`,`last_name`,`email`,`phone`,`mobile`,`password`,`registered`,`new_password`,`type`) VALUES ('','Firstname','lastname','[email protected]','555-555-1212','','de0fd3dcc902a91f9720f6dd898e4291','1335711091','','2');" - Duplicate entry '[email protected]' for key 'email'

I subbed actual customer's name with "Firstname, lastname.

Any ideas?

Link to comment
Share on other sites

The email field has to be unique on the database, means it won't accept duplicates no. It sounds like there's actually a problem with the registration script, it should either update the database when it finds a matching email (if they were just on a mailing list), or throw an error normally.

Had a look on the file and it looks ok though.. so hmm.. ah.. no, that'd be the problem, I thought the type field was for mailing lists.. but that's actually checking if they want to be registered..so definitely a bug there.

Ok, in that case, you'll need to edit your database so that the email field no longer has to be unique. In phpmyadmin this is relatively straightforward, just go to the table, hit structure, then at the bottom there'll be an indexes section with something like:


email BTREE Yes No email 4 A

You should be ok to just delete that particular line, but I'd take a backup first just in case.

If not in phpmyadmin, it gets a little trickier, so would have to know what you were using

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...