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

Unrecoverable error when saving HTML message template

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.2.3
    • Fix Version/s: 3.2.5
    • Component/s: None
    • Labels:
      None

      Description

      The following message was received after pasting in HTML directly from Dreamweaver (where it renders correctly and appears valid). It's a testing template to explore tokens.

      Searching the database didn't find anything open / in progress on this.

      Perhaps one or more of the tokens is breaking the code that updates a template.

      This happened when UPDATING an existing template that had the below code as text only. It was being edited several days after adding in the template as text only.

      The HTML part of the template message appeared to be updated, in spite of the message. I don't know if that should be considered a second bug or not. (updating source if invalid).

      It would be nice if the error could return to the editing screen, in case the user hadn't saved all the data to an external file before saving.

      CiviCRM error when saving HTML message template:

      Sorry. A non-recoverable error has occurred.
      There is a validation error with your HTML input. Your activity is a bit suspicious, hence aborting
      Return to home page.

      View Source for HTML was (WITH a newline at the last non-blank line):
      <p>This are the available message tokens:</p>
      <hr />
      <p>Addressee =

      {contact.addressee}

      </p>
      <p>Address Name =

      {contact.address_name}

      </p>
      <p>Address Type =

      {contact.custom_14}

      </p>
      <p>Birth Date =

      {contact.birth_date}

      </p>
      <p>Categories =

      {contact.custom_18}

      </p>
      <p>Checksum =

      {contact.checksum}</p>
      <p>City = {contact.city}</p>
      <p>Contact Type = {contact.contact_type}</p>
      <p>Country = {contact.country}</p>
      <p>County = {contact.county}</p>
      <p>Current Employer = {contact.current_employer}</p>
      <p>Employer ID = {contact.current_employer_id}</p>
      <p>Custom9 = {contact.custom_9}</p>
      <p>Display Name = {contact.display_name}</p>
      <p>Do Not e-Mail = {contact.do_not_email}</p>
      <p>Do not Mail = {contact.do_not_mail}</p>
      <p>Do not Phone = {contact.do_not_phone}</p>
      <p>Do not SMS = {contact.do_not_sms}</p>
      <p>Do not Trade = {contact.do_not_trade}</p>
      <p>Contact e-Mail = {contact.email}</p>
      <p>e-Mail Greeting = {contact.email_greeting}</p>
      <p>External Identifier = {contact.external_identifier}</p>
      <p>First Name = {contact.first_name}</p>
      <p>Gender = {contact.gender}</p>
      <p>Geo Code #1 = {contact.geo_code_1}</p>
      <p>Geo Code #2 = {contact.geo_code_2}</p>
      <p>Custom17 = {contact.custom_17}</p>
      <p>Image URL = {contact.image_URL}</p>
      <p>IM = {contact.im}</p>
      <p>Prefix = {contact.individual_prefix}</p>
      <p>Suffix = {contact.individual_suffix}</p>
      <p>Custom4 = {contact.custom_4}</p>
      <p>Custom3 = {contact.custom_3}</p>
      <p>Custom5 = {contact.custom_5}</p>
      <p>Custom19 = {contact.custom_19}</p>
      <p>Contact ID = {contact.contact_id}</p>
      <p>Custom13 = {contact.custom_13}</p>
      <p>Custom1 = {contact.custom_1}</p>
      <p>Custom7 = {contact.custom_7}</p>
      <p>Custom15 = {contact.custom_15}</p>
      <p>Custom6 = {contact.custom_6}</p>
      <p>Job Title = {contact.job_title}</p>
      <p>Custom10 = {contact.custom_10}</p>
      <p>Last Name = {contact.last_name}</p>
      <p>Mail to Household ID = {contact.mail_to_household_id}</p>
      <p>Custom8 = {contact.custom_8}</p>
      <p>Middle Name = {contact.middle_name}</p>
      <p>Nick Name = {contact.nick_name}</p>
      <p>Is Opt Out = {contact.is_opt_out}</p>
      <p>Custom12 = {contact.custom_12}</p>
      <p>Custom11 = {contact.custom_11}</p>
      <p>On Hold = {contact.on_hold}</p>
      <p>OpenID = {contact.openid}</p>
      <p>Contact Phone = {contact.phone}</p>
      <p>Custom16 = {contact.custom_16}</p>
      <p>Postal Code = {contact.postal_code}</p>
      <p>Postal Code Suffix = {contact.postal_code_suffix}</p>
      <p>Postal Greeting = {contact.postal_greeting}</p>
      <p>Preferred Communication Method = {contact.preferred_communication_method}</p>
      <p>Preferred Mail Format = {contact.preferred_mail_format}</p>
      <p>Sort Name = {contact.sort_name}</p>
      <p>Contact Source = {contact.contact_source}</p>
      <p>State or Province = {contact.state_province}</p>
      <p>Street Address = {contact.street_address}</p>
      <p>Street Name = {contact.street_name}</p>
      <p>Street Number = {contact.street_number}</p>
      <p>Street Number Suffix = {contact.street_number_suffix}</p>
      <p>Street Unit = {contact.street_unit}</p>
      <p>Supplemental Address 1 = {contact.supplemental_address_1}</p>
      <p>Supplemental Address 2 = {contact.supplemental_address_2}</p>
      <p>Home URL = {contact.home_URL}</p>
      <p>World Region = {contact.world_region}</p>
      <p> </p>
      <hr />
      <p>Checksum for individual record editing = {contact.checksum}

      </p>
      <p>To unsubscribe from this mailing, click <a href="

      {action.unsubscribeUrl}

      " >here</a>, or send mail to

      {action.unsubscribe}

      </p>
      <p>To resubscribe to this mailing, click <a href="

      {action.resubscribeUrl}

      " >here</a>, or send mail to

      {action.resubscribe}

      </p>
      <p>To opt-out of all future mailings from us, click <a href="

      {action.optOut}" >here</a>, or send mail to {action.optOut}

      </p>
      <p>To forward this mailing to friends or colleagues, click <a href="

      {action.forward}

      " >here</a>.</p>
      <p>To reply to this mailing, send mail to

      {action.reply}

      </p>
      <p>To see our mailing lists and join the ones you're interested in, click <a href="

      {action.subscribeUrl}

      " >here</a>.</p>
      <p>

      {action.subscribeUrl.gid}

      Provides a link to subscribe to a specific group (gid = CiviCRM ID of that group). Example:<br />To subscribe to our Monthly Newsletter, click <a href="

      {action.subscribeUrl.2}

      " >here</a>. ("2" would be the Newsletter group ID)</p>
      <p>

      {action.subscribe.gid}

      Provides an email address to subscribe to a specific group (gid = ID of the group). Example:<br />To subscribe to our Monthly Newsletter, send mail to

      {action.subscribe}

      .<br />To subscribe to our Monthly Newsletter, send mail to

      {action.subscribe.2}

      .</p>
      <p>Welcome to

      {welcome.group}

      .</p>
      <p>You requested to be subscribed to the

      {subscribe.group}

      .</p>
      <p>You have been unsubscribed from

      {unsubscribe.group}

      .</p>
      <p>As requested, you have been resubscribed to

      {resubscribe.group}

      .</p>
      <p>This mailing is from

      {domain.name}

      .</p>
      <p>Mailing Address:

      {domain.address}

      </p>
      <p>To contact us call

      {domain.phone}

      </p>
      <p>Or send a mail to

      {domain.email}

      </p>
      <p>Name of this mailing is

      {mailing.name}

      .</p>
      <p>This mailing has been sent to the members of

      {mailing.group}

      .</p>

        Attachments

          Activity

            People

            • Assignee:
              rahulbile Rahul Bile
              Reporter:
              tabletguy Stephan L Hodges
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: