I am using mailing list, but I am having problem with subscription.

I have 1 record in mailing list emails and every I try to add new it shows error:

user warning: Duplicate entry '1' for key 1 query: INSERT INTO mailing_list_emails (id, email) VALUES (1, 'email@domain.com') in C:\xampp\htdocs\demo\modules\mailing_list\mailing_list.module on line 85.

CommentFileSizeAuthor
#3 mailing_list_fix_schema.patch2.07 KBemichan

Comments

mmachina’s picture

user warning: Duplicate entry '1' for key 1 query: INSERT INTO mailing_list_emails (id, email) VALUES (1, 'email@domain.com') in /modules/mailing_list/mailing_list.module on line 85.

Yup getting the same error... anyone got any ideas?

PRZ’s picture

Same error here... anyone have anything on this yet?

emichan’s picture

StatusFileSize
new2.07 KB

Hi - this is a problem with the current database schema and the way it defines the email table. I made a patch to fix this issue - tested on my own testing server.

To apply it, download the patch, and save it to your contributed modules folder. This will be the parent directory of the mailing_list module directory. Change to this directory and patch -p0 < mailing_list_fix_schema.patch.

So for example on a single site installation from drupal root after downloading the patch, cd sites/all/modules && patch -p0 < mailing_list_fix_schema.patch.

More on applying patches : http://drupal.org/patch/apply

Applying patches on Windows: http://drupal.org/node/60179

Ta!

emichan

maartenvg’s picture

Status: Active » Needs review

This issue has a patch, therefore CNR.

rcosta’s picture

rjperry’s picture

Category: bug » support
Priority: Critical » Normal

How do I export the emails once they have been entered?

vacilando’s picture

Subscribing

Jaza’s picture

Category: support » bug
Status: Needs review » Reviewed & tested by the community

Working well for me. I'd say this is ready to commit.

litwol’s picture

Status: Reviewed & tested by the community » Fixed

thanks

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.