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

Really long URLs cause SQL issue in a trackable mass mail

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.9, 4.5.5
    • Fix Version/s: 4.6
    • Component/s: CiviMail
    • Labels:
    • Documentation Required?:
      None

      Description

      I have already reproduced this in the sandbox at: http://d45.demo.civicrm.org/

      When creating a mass mail with "Track Click-throughs?" checked as yes, if the user puts a very long URL (ie longer than 255 characters) then the following SQL error occurs:

      INSERT INTO civicrm_mailing_trackable_url (url , mailing_id ) VALUES ('https://mygroup.org/page/contribute/to-our-friends-who-we-care-about-wellbeing?source=BPI_EM_20141126_Thankful_Infographic_DonateButton&utm_source=FITH&utm_medium=email&utm_term=Thankful&utm_content=DonateButton&utm_campaign=EM_20141126_Thankful_Infographicandeasasdalkuieuoweruwoeruworuwohkh' , 4 ) [nativecode=1406 ** Data too long for column 'url' at row 1]

      to reproduce:

      1) Click "Mailings ... Create New Mailing"

      2) Choose any group and click "Next"

      3) Check the box to enable "Track Click-throughs" and click "Next"

      4) In the body of the email message, create a hyperlink to a very long URL that has more than 255 characters. (such as the one in the error above)

      5) Click "Next". You will now see the SQL error message

      FYI: As a work-around, I increased the database field "civicrm_mailing_trackable_url.url" size to 500

        Attachments

          Activity

            People

            • Assignee:
              yashodha Yashodha Chaku
              Reporter:
              sgladstone Sarah Gladstone
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: