Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Duplicate email issue

  1. #1
    Purplemouse is offline Junior Member
    Join Date
    Jan 2006
    Posts
    1

    Default Duplicate email issue

    We have run into a problem where we get multiple copies of an email message.

    It seems to occur when an email message is manually associated with more than one contact. From then on, any communication is duplicated by the number of contacts associated. Deleting one message will delete all of them.

    Has anyone seen this and have a fix? Currently trying to dissassociate messages with contacts to undo this from the backend.

    Thanks!

    Stu

  2. #2
    sugarchris's Avatar
    sugarchris is offline Sugar Community Member
    Join Date
    Sep 2005
    Location
    San Francisco, CA
    Posts
    861

    Default Re: Duplicate email issue

    Hi Stu,

    Thanks for this bit of information. I've shown your post to a couple devs around here, and we were able to replicate. This issue stems from the kind of relationship emails have with contacts - as generally they should be one (contact)-to-many (emails), but in the case of a generic alias, such as info@sugarcrm.com, or where 1+ contacts share an address, you get this issue.

    The permanent fix is going to take awile. No question about it as it will touch a lot of core files.

    The temporary fix/workaround is to edit modules/Emails/Email.php, in the function create_list_query(), comment out the lines below:
    PHP Code:
    ...
            
    $query .= " LEFT JOIN emails_contacts ec ON emails.id = ec.email_id";
            
    $query .= " LEFT JOIN contacts ON ec.contact_id = contacts.id ";  
    ... 

  3. #3
    highcrm is offline Member
    Join Date
    Jul 2005
    Posts
    9

    Default Re: Duplicate email issue

    Ok, I had the same problem... but which version will have it fixed?

  4. #4
    bjs3 is offline Sugar Community Member
    Join Date
    Jul 2005
    Posts
    54

    Default Re: Duplicate email issue

    I have the same question: when will we get a version of sugar with the email bugs out?

    Regards

    Bruno

  5. #5
    tfrebault is offline Sugar Community Member
    Join Date
    Sep 2005
    Posts
    270

    Default Re: Duplicate email issue

    or You can add in ./modules/Emails/Email.php in the function create_list_query() - before the line with.. $order_by ..



    PHP Code:
    $query .= " GROUP BY emails.id "
    regards

  6. #6
    gammamatrix is offline Member
    Join Date
    Sep 2006
    Posts
    6

    Default Re: Duplicate email issue

    I used the group by email fix above.

    modules/Emails/Email.php on Line 1762

    In the function: create_list_query()


    $query .= " GROUP BY emails.id ";


    Works fine for my site.

  7. #7
    gammamatrix is offline Member
    Join Date
    Sep 2006
    Posts
    6

    Default Re: Duplicate email issue

    I forgot to mention...

    I am using patch 4.5.0g

  8. #8
    RapidX is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Irvine, CA
    Posts
    234

    Default Re: Duplicate email issue

    I am also using 4.5.0g yet neither fix seems to work. Any other suggestions?
    David Moceri
    DavidMoceri@gmail.com
    www.HeyGoTo.com - Marketing Experts!
    +1 855-HeyGoTo (439-4686)
    +1 702-475-4227

    IM Accounts:
    Aol -DavidMoceri
    Hotmail - DavidMoceri
    Yahoo – DavidMoceri
    ICQ – 202565459
    Skype - DavidMoceri

  9. #9
    gammamatrix is offline Member
    Join Date
    Sep 2006
    Posts
    6

    Default Re: Duplicate email issue

    The fix I said worked above broke something else.

    The list view no longer works for emails.

    When you do a "group by," it breaks email counts for the List View Section.

    What does that mean?

    Let's say you have 42 emails in your inbox.

    You will see the first 20. you will not be able to navigate to the other 22 emails because the start/preview/next/end will show (1 - 1 of 1) instead of (1 - 20 of 42).

    I have rewritten part of the email client to allow Opportunities to be linked to emails. I also added a preview for emails (to make sure you are not sending garbage or blank emails). I rewrote part of the Template Section to correctly parse variables. I have a few more fixes I am trying to do as well.

    I chose to use the Zend Framework as my Database handler instead of trying to use SugarBeans. If I can get this a little more stable, I may release some of the files for others to use.

  10. #10
    skeath is offline Junior Member
    Join Date
    May 2007
    Posts
    3

    Default Re: Duplicate email issue

    The temporary fix/workaround is to edit modules/Emails/Email.php, in the function create_list_query(), comment out the lines below:
    PHP Code:
    ...
            
    $query .= " LEFT JOIN emails_contacts ec ON emails.id = ec.email_id";
            
    $query .= " LEFT JOIN contacts ON ec.contact_id = contacts.id ";  
    ... 
    [/QUOTE]

    I did that, and it broke the query. The other fix breaks the List View.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •