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) »
  • 4.6.0 ignores "mandatory tokens" in message footers
Pages: [1]

Author Topic: 4.6.0 ignores "mandatory tokens" in message footers  (Read 1456 times)

charlie

  • I’m new here
  • *
  • Posts: 15
  • Karma: 1
  • CiviCRM version: 4.5.8 (testing 4.6.2)
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.27
  • PHP version: 5.3.28
4.6.0 ignores "mandatory tokens" in message footers
April 04, 2015, 01:13:26 pm
Now that 4.6.0 is the default current version for download, I decided to give it a look.  I started with a working test site running 4.5.8 and went through the upgrade procedure with no hitches.

When composing a new message or resuming a draft, I get a "required tokens are missing" error. The only way to clear the error is to place both the {domain.address} token and an OptOut or Unsubscribe token in the BODY of the message. The fact that one or both of these tokens is already present in my message footer does not matter.  The setting of "Disable mandatory tokens" also makes no difference.

This bug is similar, but not identical, to CRM-14628.

This problem is easily reproduced in the current sandbox system.

I'm running Drupal 7.36 on Mac OS 10.8.5, with MySQL 5.5.27 and PHP 5.3.28 on Apache 2.2.29.

rjlang

  • I post occasionally
  • **
  • Posts: 48
  • Karma: 1
  • CiviCRM version: 4.2.8
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3.19
Re: 4.6.0 ignores "mandatory tokens" in message footers
April 04, 2015, 07:30:06 pm
I did the same upgrade from 4.5.8 to 4.6.0, encountered exactly the same problem.

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: 4.6.0 ignores "mandatory tokens" in message footers
April 04, 2015, 11:15:32 pm
Thanks, I see the same problem. Filed issue; aiming to fix in 4.6.1. https://issues.civicrm.org/jira/browse/CRM-16237

This is odd because I tested those scenarios (permutations of body/header/footer and required tokens) fairly heavily during alpha cycle. It must be a regression from the beta cycle.

erogers

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
  • CiviCRM version: 4.6.2
  • CMS version: Wordpress 4.1
  • MySQL version: 5
  • PHP version: 5
Re: 4.6.0 ignores "mandatory tokens" in message footers
April 08, 2015, 05:49:31 am
Same problem here. Any workaround before the next version comes out?

LoganBear

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.67
  • PHP version: 5.3.28
Re: 4.6.0 ignores "mandatory tokens" in message footers
April 08, 2015, 07:42:23 am
Just another voice added to the list...  This is making emails more complicated for my users.

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: 4.6.0 ignores "mandatory tokens" in message footers
April 08, 2015, 02:10:42 pm
One can work-around by applying a patch directly. To check for tokens in header/footer, see:

https://github.com/civicrm/civicrm-core/pull/5579/files

To respect the "Disable mandatory tokens" option, see:

https://github.com/civicrm/civicrm-core/pull/5585/files

erogers

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
  • CiviCRM version: 4.6.2
  • CMS version: Wordpress 4.1
  • MySQL version: 5
  • PHP version: 5
Re: 4.6.0 ignores "mandatory tokens" in message footers
April 08, 2015, 05:08:52 pm
Any work-arounds for non programmers?


Quote from: totten on April 08, 2015, 02:10:42 pm
One can work-around by applying a patch directly. To check for tokens in header/footer, see:

https://github.com/civicrm/civicrm-core/pull/5579/files

To respect the "Disable mandatory tokens" option, see:

https://github.com/civicrm/civicrm-core/pull/5585/files

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: 4.6.0 ignores "mandatory tokens" in message footers
April 08, 2015, 05:24:01 pm
Unfortunately, the only solution is to update the code. We'll publish a new tarball next week, but for now I can offer some more detail about how to manually patch. It's a very small change.

1) Find the civicrm directory (e.g. Drupal: "sites/all/modules/civicrm", WP: "wp-content/plugins/civicrm/civicrm", or Joomla: "public/administrator/components/com_civicrm/civicrm").

2) Edit the file CRM/Mailing/Info.php

3) Around line 123, you should see:

Code: [Select]
      'return' => array('name', 'component_type', 'is_default'),

4) Add two items to the comma-separated list -- 'body_html' and 'body_text'. It should now look like this:

Code: [Select]
      'return' => array('name', 'component_type', 'is_default', 'body_html', 'body_text'),

The Doctor

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 1
  • CiviCRM version: 4.7.x
  • CMS version: Drupal 7.x
Re: 4.6.0 ignores "mandatory tokens" in message footers
April 13, 2015, 12:18:34 pm
totten,

Thank you so much for posting these instructions. They worked like a charm. And thank you for all your hard work on CiviCRM.

Yes, there are some bugs in CiviMail 4.6, but overall it looks like a nice improvement. Thanks.

charlie

  • I’m new here
  • *
  • Posts: 15
  • Karma: 1
  • CiviCRM version: 4.5.8 (testing 4.6.2)
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.27
  • PHP version: 5.3.28
Re: 4.6.0 ignores "mandatory tokens" in message footers
April 21, 2015, 10:33:25 am
Quote from: totten on April 04, 2015, 11:15:32 pm
Thanks, I see the same problem. Filed issue; aiming to fix in 4.6.1. https://issues.civicrm.org/jira/browse/CRM-16237

This is odd because I tested those scenarios (permutations of body/header/footer and required tokens) fairly heavily during alpha cycle. It must be a regression from the beta cycle.

Yes, 4.6.1 appears to fix this.  Thank you!

joelcomit

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • Owner/Designer/Developer at Comit Strategies
    • Comit Strategies
  • CiviCRM version: 4.5.5
  • CMS version: WordPress 4.1
  • MySQL version: 10.0.14-MariaDB
  • PHP version: 5.4.34
Re: 4.6.0 ignores "mandatory tokens" in message footers
April 21, 2015, 10:56:16 am
If you have both an HTML and Text version of the footer, be sure the mandatory token is in both. That was tripping me up yesterday.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • 4.6.0 ignores "mandatory tokens" in message footers

This forum was archived on 2017-11-26.