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 CiviEvent (Moderator: Yashodha Chaku) »
  • token replacement adds space in scheduled reminder
Pages: [1]

Author Topic: token replacement adds space in scheduled reminder  (Read 4773 times)

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
token replacement adds space in scheduled reminder
May 17, 2013, 02:29:45 pm
creating a scheduled reminder message in 4.3.3
add a link to auto authenticate and populate webform: site/reg-form?cid1={contact.contact_id}​&cs1={contact.hash}​
'&' is concerted to space site/reg-form?cid1=1154%E2%80%8B&cs1=9797bdd3e2076e157a35054ec61ed846%E2%80%8B

Do token replacements like this need some sort of escaping?

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: token replacement adds space in scheduled reminder
May 20, 2013, 03:20:41 am
sonicthoughts :

Can you file an issue with our issue tracker JIRA (http://issues.civicrm.org)

-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: token replacement adds space in scheduled reminder
May 20, 2013, 09:23:13 am
logged: http://issues.civicrm.org/jira/browse/CRM-12666

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: token replacement adds space in scheduled reminder
May 21, 2013, 03:51:40 am
sonicthoughts :

The code E2 80 8B is the UTF-8 code for the character Zero Width Space, your link seems to have Zero Width Space in it

Can you try to re-type the url again and check

I tried this locally and it worked

Code: [Select]
site/reg-form?cd1={contact.contact_id}&cs1={contact.hash}
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: token replacement adds space in scheduled reminder
May 21, 2013, 06:07:28 am
Does not have 0.  I think it is trying to convert the ampersand to HTML.  I will try to run some more tests later.  I switched to Source mode in CKEDITOR, removed it and saved.  that is a workaround (for me, but not client:))

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
VERIFIED ON DEMO: token replacement adds space in scheduled reminder
May 21, 2013, 10:16:05 am
Ok, I recreated the issue on demo server.  think it is the CKEDITOR setup:
See:
http://screencast.com/t/PVWKLBRy1
http://screencast.com/t/axqhpdaXt
http://screencast.com/t/JA0bLwo2B

One more thing.  I also include a non-url encoded link (ie. copy and paste the following into your browser: /reg-form?cid1={contact.contact_id}​&;cs1={contact.hash}​​ ) and that had a problem with & also, but it looked a bit different when I saw the actual encoded email: /reg-form?cid1=1158&​cs1=7c5e271faa1c0b0cb62ab2ffccff027b​​
« Last Edit: May 21, 2013, 10:41:54 am by sonicthoughts »

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: token replacement adds space in scheduled reminder
May 23, 2013, 08:15:21 am
I created the link using the CKEditor, still seems to be working fine for me
 
Its showing me proper link in the email without the white space characters.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: token replacement adds space in scheduled reminder
May 23, 2013, 10:00:51 am
Interesting .... This is kind of hard to track down as there are lot's of pieces: scheduled job, email, ckeditor, rendered email, etc. .... However I think the issue might be related to how ckeditor config.js is configured to encode entities.  Unfortunately, changing the settings has not resolved it for me. 
The strange thing is that according to: http://wiki.civicrm.org/confluence/display/CRMDOC43/Configuring+CiviCRM+to+Use+the+Default+Drupal+Editor
If I understand correctly, unlike Drupal input filters, Civicrm actually stores the data exactly as the CKEDITOR saves it.  When you look at those screenshots above, the source defintely shows the "&". Is that the case for you? Can you see how it is stored in the DB?  Did you also use the Ckeditor to build the link?

If you can't reproduce and it is just an issue with my config (note I'm using 4.3.3 and no change to the the config.js or custom code) then I'll continue to work on my own but any advice to debug would be helpful.

Thanks,

S

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • token replacement adds space in scheduled reminder

This forum was archived on 2017-11-26.