Kentico 11 eNewsletter issue

Wei Wang asked on January 5, 2023 16:16

Hi,

We use Kentico 11 portal engine for our site. Recently we scheduled to send out an enewsletter but failed. The error says: These columns don't currently have unique values. Exception type: System.ArgumentException Stack trace: at System.Data.ConstraintCollection.AddUniqueConstraint(UniqueConstraint constraint) at System.Data.ConstraintCollection.Add(Constraint constraint, Boolean addUniqueWhenAddingForeign) at System.Data.DataTable.set_PrimaryKey(DataColumn[] value) at CMS.Newsletters.EmailQueueManager.FillContactTable(DataTable table, IssueInfo issue, Int32 siteId, Boolean monitorBounces, Int32 bounceLimit, HashSet1 generatedEmails, IEmailAddressBlocker emailAddressBlocker) at CMS.Newsletters.EmailQueueManager.GenerateContactEmails(IssueInfo issue, SiteInfo site, Boolean monitorBounces, Int32 bounceLimit, HashSet1 generatedEmails, IEmailAddressBlocker emailAddressBlocker) at CMS.Newsletters.EmailQueueManager.GenerateEmails(IssueInfo issue) at CMS.Newsletters.QueueSender.Execute(TaskInfo task)

any idea?

Thanks Wei Wang

Recent Answers


Wei Wang answered on January 5, 2023 16:16

Message: These columns don't currently have unique values.

Exception type: System.ArgumentException Stack trace: at System.Data.ConstraintCollection.AddUniqueConstraint(UniqueConstraint constraint) at System.Data.ConstraintCollection.Add(Constraint constraint, Boolean addUniqueWhenAddingForeign) at System.Data.DataTable.set_PrimaryKey(DataColumn[] value) at CMS.Newsletters.EmailQueueManager.FillContactTable(DataTable table, IssueInfo issue, Int32 siteId, Boolean monitorBounces, Int32 bounceLimit, HashSet1 generatedEmails, IEmailAddressBlocker emailAddressBlocker) at CMS.Newsletters.EmailQueueManager.GenerateContactEmails(IssueInfo issue, SiteInfo site, Boolean monitorBounces, Int32 bounceLimit, HashSet1 generatedEmails, IEmailAddressBlocker emailAddressBlocker) at CMS.Newsletters.EmailQueueManager.GenerateEmails(IssueInfo issue) at CMS.Newsletters.QueueSender.Execute(TaskInfo task)

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on January 5, 2023 16:54

Are you doing this via the Kentico UI or via the API? If you're doing it via the API, there's a good change you are not properly sending the right data to the methods.

0 votesVote for this answer Mark as a Correct answer

Wei Wang answered on January 5, 2023 16:56

via kentico interface, not API The newsletter subscribe list can't have dup emails?

0 votesVote for this answer Mark as a Correct answer

Wei Wang answered on January 5, 2023 16:57

And the last enewsletter went out in December works, not sure what happened

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on January 5, 2023 16:59

A subscriber contact/email should technically be in a list exactly 0 or 1 times. The system should handle this automatically and only allow 0 or 1 times per contact/email.

0 votesVote for this answer Mark as a Correct answer

Wei Wang answered on January 5, 2023 17:05

no, I found lots of dup emails in the table Newsletter_Subscirber table, the system doesn't seem to prevent dup emails

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on January 5, 2023 17:53

If you're using the OOTB subscription form it does or should. So maybe check for duplicates and remove them from that newsletter.

0 votesVote for this answer Mark as a Correct answer

Elmar Höfinghoff answered on January 6, 2023 10:06 (last edited on January 6, 2023 10:06)

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.