View Issue Details

IDProjectCategoryView StatusLast Update
0002593phplist applicationRepetitionpublic23-02-05 01:36
Reporterdanielm 
PrioritynormalSeveritymajorReproducibilityrandom
Status resolvedResolutionfixed 
Product Version2.8.12 
Target VersionFixed 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???

Thanx.
TagsNo tags attached.

Relationships

child of 0002456 resolvedmichiel PHPList v2.9.4 release 

Activities

DamienMcKenna

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

'."\n";

(added newline)

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

        print "$email
\n";

(added newline)

DamienMcKenna

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.

Damien

DamienMcKenna

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?

Damien

DamienMcKenna

16-02-05 05:10

manager   ~0003504

Changes need to be added to CVS.

danielm

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?

Thanx

DamienMcKenna

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?

Damien

danielm

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.

michiel

23-02-05 01:36

manager   ~0003607

submitted to CVS, will propagate to next release