Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-13597

Event participants included twice on exports if they have more than one website

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.7
    • Fix Version/s: 4.6.7
    • Component/s: CiviEvent
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Core Team Funds

      Description

      If a contact has more than one website, they appear twice on all-primary-field exports of event listings. Replicated on WordPress 4.4 demo.

      This is down to /CRM/Contact/BAO/Query.php. Specifically:

      case 'civicrm_website':
      $from .= " $side JOIN civicrm_website ON contact_a.id = civicrm_website.contact_id and website_type_id = 21 ";

      Which creates a row for every entry in civicrm_website. I was going to fix it by checking on is_primary (as happens for phone, email etc), but the civicrm_website table doesn't have that field.

      It seems like this might be affecting other queries as I don't think the code is specifically for CiviEvents, but I'm not familiar enough with Civi structures to figure it out. Either way, I don't want to start hacking about with something so important, so figured I'd turn this one over to the experts.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              krypto Andrew West
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: