Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

1062 Duplicate entry 'xxx@xxx.com' for key 'email_UNIQUE'

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
3 years 4 months ago #325984 by boyjahq
We are regularly having a problem generated by the CBSubs AcyMailing plugin.

The error is:
1062 Duplicate entry 'xxx@xxx.com' for key 'email_UNIQUE'

It seems that, if someone has previously subscribed to our mailing list as a non-registered guest through AcyMailing and then they try to register as a member, there is a point in the registration process where that error is generated. For example, after registration and confirming their email address, when they are taken to the payment page. If they choose Offline Payment and then on the basket page they click the CONFIRM_OFFLINE_PAYMENT link, they end up with that error.

It also happens in admin backend when we are trying to edit the profile of a particular user. We occasionally get this error and when we look into it, it seems that the issue is that the member's email address is already in the AcyMailing list but not associated with their current user id.

Is there some setting or some place we should look to avoid this? For example, is there a way (perhaps an Auto Action) that we can associate an existing email address in AcyMailing users to a newly created user account that wants to use the same email address as they used when they subscribed to the mailing list before they were a member?

Also we notice that when a member changes their email address in their profile (we use CB Reconfirm Email), the email address for them in AcyMailing does not change to the updated email address.

Under the AcyMailing tab in Integrations for each plan, we have it set so that new members are automatically registered to our mailing list and Remove on plan deactivation is set to No.

CBSubs is version 4.5.2+build.2021.06.25.17.09.42.53205149f
Community Builder is version 2.6.0+build.2021.06.28.15.38.58.c5219011c
AcyMailing plugin is version 4.5.2+build.2021.06.25.17.09.42.53205149f
AcyMailing Starter extension version 6.16.4

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
3 years 4 months ago - 3 years 4 months ago #325989 by krileon

it seems that the issue is that the member's email address is already in the AcyMailing list but not associated with their current user id.

Sounds like something else installed is adding them to AcyMailing, but isn't adding their user id. CBSubs AcyMailing will always add their user id via AcyMailing API, but since AcyMailing has a unique database key on the email column it errors. Are you using any other means of subscribing to newsletters than CBSubs AcyMailing? If so I recommend reviewing those other usages.

Also we notice that when a member changes their email address in their profile (we use CB Reconfirm Email), the email address for them in AcyMailing does not change to the updated email address.

CB is not responsible for handling that. The primary email address CB uses is Joomlas which is stored in _users table. Saving a CB users triggers Joomla user store events. AcyMailing should already be handling keeping that synchronized with their Joomla user or system plugin. Ensure it's published and configured properly in Extensions > Plugins. If you continue to have issues with this I suggest contacting AcyMailing.

Also looks like they've improved their API further and will review adding a check to try and grab the users AcyMailing entry by email address if my user id fails then correcting the missing user id in CBSubs AcyMailing, but this ideally still needs fixed wherever they're being subscribed without a user id.

docs.acymailing.com/developers/acymailing-developer-documentation#insert-a-user-in-acymailing

forge.joomlapolis.com/issues/8667


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 3 years 4 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
3 years 4 months ago #325990 by boyjahq

Sounds like something else installed is adding them to AcyMailing, but isn't adding their user id. CBSubs AcyMailing will always add their user id via AcyMailing API, but since AcyMailing has a unique database key on the email column it errors. Are you using any other means of subscribing to newsletters than CBSubs AcyMailing? If so I recommend reviewing those other usages.


As I said, people are able to subscribe to our mailing list without a registered membership. After they have subscribed as a non-member guest to the mailing list, they decide to join as a member. As part of CBSubs plan AcyMailing integration, they are automatically subscribed to our mailing list. There is nothing else in our system related to AcyMailing except the Community Builder AcyMailing plugin.

All we need is for that plugin to recognize that when a person is registering as a Community Builder member that if the email address they are using is already existing in the AcyMailing database because they previously registered as a NON-MEMBER, in which case the Community Builder AcyMailing plugin connects that existing email address to the newly created membership account.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
3 years 4 months ago #325991 by krileon

All we need is for that plugin to recognize that when a person is registering as a Community Builder member that if the email address they are using is already existing in the AcyMailing database because they previously registered as a NON-MEMBER, in which case the Community Builder AcyMailing plugin connects that existing email address to the newly created membership account.

That's exactly what I'm working on implementing as per the above feature ticket. :)

Should be done today, but might not be available until early next week.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum