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

getTrackerURL() returns invalid url_id for CiviMail A/B Test

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.8, 4.7.6
    • Fix Version/s: 4.7.9
    • Component/s: CiviMail
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      When you create new A/B test in CiviMail and when you use the same link in both text versions (A and B) then CiviCRM returns invalid url. This case occurs in all test type.

      mysql> select * from civicrm_mailing_trackable_url where mailing_id in (776 /* A */, 777 /* B */);

      And then only-text link in Mailing B has url_id = 1998. This is invalid behaviour because url_id = 1998 is linked with mailing_id = 776 not with mailing_id = 777.

      Proper result have to be like this:

      This can be achieved by extending key for cache array by adding mailing_id
      https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/BAO/TrackableURL.php#L61

      I'm going to prepare PR

        Attachments

          Activity

            People

            • Assignee:
              yashodha Yashodha Chaku
              Reporter:
              scardinius Scardinius
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: