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

Send an Email activity fails with Tokens

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 4.2.1, 4.2.2
    • Fix Version/s: None
    • Component/s: None

      Description

      The Contact "Send an Email" activity fails when

      {action.unsubscribeUrl} {action.optOutUrl} {domain.address} tokens are included in the message body. The error also occurs when including {action.unsubscribe} {action.optOut} {domain.address} tokens.

      Here is the html code I've used successfully in CiviMail 4.1 templates:
      <p>To stop this newsletter <a href="{action.unsubscribeUrl}

      " target="_blank">Unsubscribe</a></p>
      <p>To block all email <a href="

      {action.optOutUrl}

      " target="_blank">Opt-Out</a></p>
      <p>This email is from:<br /><span style="font-size: 80%;">

      {domain.address}

      </span></p>

      And finally, from the error log:
      Oct 11 18:50:16 [info] $Fatal Error Details = Array
      (
      [message] => We experienced an unexpected error. Please post a detailed description and the backtrace on the CiviCRM forums: http://forum.civicrm.org/
      [code] =>
      )

      Oct 11 18:50:16 [info] $backTrace = #0 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(300): CRM_Core_Error::backtrace("backTrace", TRUE)
      #1 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Token.php(941): CRM_Core_Error::fatal()
      #2 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Task/EmailCommon.php(199): CRM_Utils_Token::getTokenDetails((Array:0), (Array:7), FALSE, FALSE)
      #3 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Task/Email.php(109): CRM_Contact_Form_Task_EmailCommon::buildQuickForm(Object(CRM_Contact_Form_Task_Email))
      #4 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(350): CRM_Contact_Form_Task_Email->buildQuickForm()
      #5 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php(93): CRM_Core_Form->buildForm()
      #6 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Contact_Form_Task_Email), "display")
      #7 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Task_Email), "display")
      #8 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(289): HTML_QuickForm_Page->handle("display")
      #9 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(115): CRM_Core_Controller->run()
      #10 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(193): CRM_Utils_Wrapper->run("CRM_Contact_Form_Task_Email", "Activities", (Array:1))
      #11 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm.php(271): CRM_Core_Invoke::invoke((Array:4))
      #12 [internal function](): civicrm_wp_invoke("")
      #13 /home/ndpnyorg/public_html/wp-includes/plugin.php(403): call_user_func_array("civicrm_wp_invoke", (Array:1))
      #14 /home/ndpnyorg/public_html/wp-admin/admin.php(151): do_action("toplevel_page_CiviCRM")
      #15

      {main}

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ericross Eric R Ross
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: