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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Gotcha: tokens + spell-check-as-you-type
Pages: [1]

Author Topic: Gotcha: tokens + spell-check-as-you-type  (Read 1391 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Gotcha: tokens + spell-check-as-you-type
July 06, 2011, 10:03:45 pm
Edit: this issue will affect anyone using CkEditor prior to version 3.4.2, when they use Civi email tokens. (Note that 3.4.2 is the CkEditor version not the CiviCRM version of the same name!)

Sometimes, we find that Email Tokens are not replaced in emails. It's due to our (peculiar) set up, but may effect people who elect to use their CMS' HTML Editor. (We use CkEditor, and took a 'roll-your-own' approach, before "use the CMS editor" was made a feature of CiviCRM.)

This is not really a CiviCRM issue, but it may effect the occasional user of CiviCRM. I'd be interested to know if anyone has had this issue, or whether the feature "use the CMS editor" resolves this problem.

This is how it happens ...
  • Embed a token in the email
  • The spell-check-as-you-type feature of CkEditor replaces "{contact.first_name}" with "{<span data-scayt_word="contact.first_name" data-scaytid="1">contact.first_name</span>}". (The SPAN is used to format the 'misspelled' word with a red wavy underline.)
  • Upon hitting "Send" CiviCRM grabs the content including the SPAN element.
  • The CiviCRM token replacement misses the token

Versions of CkEditor subsequent to 3.4.2 have this fixed to remove the SCAYT SPANs before the HTML is returned to the application
« Last Edit: July 07, 2011, 05:29:43 pm by ken »

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Gotcha: tokens + spell-check-as-you-type
July 07, 2011, 04:19:59 pm
It appears this is a general problem with CkEditor - see http://dev.ckeditor.com/ticket/6588

The fix is to upgrade the editor to version 3.4.2 or above.

A workaround is to disable spell-check-as-you-type before sending the email.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Gotcha: tokens + spell-check-as-you-type

This forum was archived on 2017-11-26.