CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Activity Mail Tokens Not Working
Pages: [1]

Author Topic: Activity Mail Tokens Not Working  (Read 563 times)

ericross

  • I’m new here
  • *
  • Posts: 27
  • Karma: 0
  • civiadmin
    • National Day of Prayer New York
  • CiviCRM version: 4.6.2
  • CMS version: WordPress 4.1.1
  • MySQL version: 5.5.40-36.1
  • PHP version: 5.4.38
Activity Mail Tokens Not Working
March 23, 2014, 07:16:03 pm
Mail templates can be used for CiviMail and for Contact Activity Mail but CiviMail Required Tokens cause Contact Mail white screen with fatal failure. Removing the code segment below that includes {action.unsubscribeURL}, {action.optOutURL}, {domain.address} resolves the problem.



<td style="margin: 5px auto; padding: 5px; width: 32%;" align="center">
<p style="text-align: center; font-size: 80%;">To stop this newsletter&nbsp; <a href="{action.unsubscribeURL}" target="_blank">Unsubscribe</a></p>
<p style="text-align: center; font-size: 80%;">To block all email&nbsp; <a href="{action.optOutURL}" target="_blank">Opt-Out</a></p>
</td>
<td style="margin: 5px auto; padding: 5px; width: 32%;" align="center">
<p style="text-align: center; font-size: 80%;">This email is from:<br /> <span style="font-size: 80%;">{domain.address} </span></p>
</td>
</tr>




The work around is clear:
1. Don't use these tokens in activity mail where they are not required and probably not desirable.
2. Write different templates for CiviMail and Activity Mail


At some point, it would be good to plug this hole so that even accidental inclusion doesn't cause a failure.





Here is the error log.


Mar 21 19:06:41  [info] $Fatal Error Details = Array
(
    [message] =>
   
Code: [Select]
=>
)




Mar 21 19:06:41  [info] $backTrace = #0 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(322): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Token.php(1039): CRM_Core_Error::fatal()
#2 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Task/EmailCommon.php(198): 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(370): 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(345): HTML_QuickForm_Page->handle("display")
#9 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(117): CRM_Core_Controller->run()
#10 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(297): CRM_Utils_Wrapper->run("CRM_Contact_Form_Task_Email", "Activities", (Array:1))
#11 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(72): CRM_Core_Invoke::runItem((Array:14))
#12 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#13 /home/ndpnyorg/public_html/wp-content/plugins/civicrm/civicrm.php(466): CRM_Core_Invoke::invoke((Array:4))
#14 [internal function](): CiviCRM_For_WordPress->invoke("")
#15 /home/ndpnyorg/public_html/wp-includes/plugin.php(429): call_user_func_array((Array:2), (Array:1))
#16 /home/ndpnyorg/public_html/wp-admin/admin.php(217): do_action("toplevel_page_CiviCRM")
#17 {main}



Usability Matters.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Activity Mail Tokens Not Working

This forum was archived on 2017-11-26.