View Issue Details

IDProjectCategoryView StatusLast Update
0002593phpList 3 applicationRepetitionpublic23-02-05 01:36
Reporterdanielm Assigned To 
Status resolvedResolutionfixed 
Product Version2.8.12 
Fixed in Version2.9.4 
Summary0002593: duplicate emails in import emails
DescriptionWhen I try to import emils from a text file, where the email adresses are separated by a comma and a space, it doesn't recognize the emails that are already in the database, thus creating duplicates. When I looked at the duplicates, they had a space before the email adress. Even though it has the space and it doesn't recognize the duplicate, it does send the message to that adress twice.

How do i remove the duplicates???

TagsNo tags attached.


child of 0002456 resolvedmichiel PHPList v2.9.4 release 



16-02-05 05:00

manager   ~0003501

Last edited: 16-02-05 05:00

Suggested change 1: admin/import1.php, line 99:

    $email = trim(array_shift($uservalues));

(added trim function)

Suggested change 2: admin/import1.php, line 117:

    print 'Test output:
There should only be ONE email per line.
If the output looks ok, go javascript:history.go(-1) to resubmit for real


(added newline)

Suggested change 3: admin/import1.php, line 122:

        print "$email

(added newline)


16-02-05 05:04

manager   ~0003502

Suggested change 1 will remove any extra space around the email address when it is being imported. This won't help you though. I'll see if I can come up with something to help fix your existing problem.



16-02-05 05:10

manager   ~0003503

Would it be too much work to remove the imported entries from the database and re-import them after making the code modification (mainly change 1) above?



16-02-05 05:10

manager   ~0003504

Changes need to be added to CVS.


16-02-05 14:50

reporter   ~0003508

I'm afraid it's too late to import the emails all over again. Not all have confirmed and since then, others signed up already. I've noticed that many email adresses have a space before. What can I do to remove the space from the existing records?



18-02-05 04:20

manager   ~0003560

You may have to edit the database manually using e.g. phpMyAdmin, I'm afraid. There's currently no easy way to edit the accounts like that. I could write up a PHP script to manually fix this for you if you'd like?



18-02-05 09:03

reporter   ~0003566

Thanx, Damien.

I don't want to trouble you too much. The solution you gave me worked great for another site I worked on. It did remove the duplicates succesfully. I suggest you add this in the standard program.

As far as my first problem, I wonder if there is a way to trim the existing records, without losing the confirmed - unconfirmed options. The only problem I have is the stress of subscribing someone twice. That would really suck.

Many thanx.


23-02-05 01:36

administrator   ~0003607

submitted to CVS, will propagate to next release