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) »
  • Double Quotes (" ") in Custom Data labels caused Javascript errors
Pages: [1]

Author Topic: Double Quotes (" ") in Custom Data labels caused Javascript errors  (Read 1107 times)

JoopSJ

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 2
Double Quotes (" ") in Custom Data labels caused Javascript errors
November 23, 2009, 03:52:11 am
Hello,
Not a question, just a remark in case you run into the same problem. Maybe obvious for most of you, but it wasn't for me *until now*

I was having some JS errors on some pages involving collapsible field etc.
After investigating it appeared that those wre caused by a label used by a custom data field.
Subscribe to our magazine "Be informed"

This will result in Javascript failing due to quotes within qoutes:
 
Code: [Select]
filterArray["{contact.custom_117}"] = "Subscribe to our magazine "Be informed" :: Magazines";
I have changed the field to:
Subscribe to our magazine 'Be informed'

and now the generated Javascript is correct:
 
Code: [Select]
filterArray["{contact.custom_117}"] = "Subscribe to our magazine 'Be informed' :: Magazines";

So, don't put double quotes in your field labels.... :)

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Double Quotes (" ") in Custom Data labels caused Javascript errors
November 23, 2009, 05:04:58 am
Can you file an issue for this.

Thanks,
Kurund
Found this reply helpful? Support CiviCRM

JoopSJ

  • I post occasionally
  • **
  • Posts: 80
  • Karma: 2
Re: Double Quotes (" ") in Custom Data labels caused Javascript errors
November 23, 2009, 05:24:39 am
Hey Kurund, I will, regards, Joop

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Double Quotes (" ") in Custom Data labels caused Javascript errors
November 23, 2009, 09:10:03 pm
For tracking purpose: http://issues.civicrm.org/jira/browse/CRM-5433

Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Double Quotes (" ") in Custom Data labels caused Javascript errors

This forum was archived on 2017-11-26.