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 CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • newline in campaign description breaks campaign dashboard
Pages: [1]

Author Topic: newline in campaign description breaks campaign dashboard  (Read 1564 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
newline in campaign description breaks campaign dashboard
May 04, 2011, 07:40:21 pm
3.4.0 - reproducible on drupal demo

1. Create a campaign
2. Set the description to contain a newline character, eg
Quote
Line 1
Line 2
3. The campaign dashboard is now empty

/CRM/Campaign/Page/AJAX.php calls CRM_Utils_JSON::encodeDataTableSelector on line 598. The output from this is something like ...
Quote
{"sEcho": 1, "iTotalRecords": 3, "iTotalDisplayRecords": 3, "aaData": [ ["3","Sydney_2011_H1_fundraising","Sydney 2011 H1 fundraising","Purpose:
To encourage people to become regular givers for H2 in 2011;
To encourage people to give more as regular givers for H2 in 2011; and
To encourage people to give a one-off gift in H1 in 2011", (continued)
.

Note the newline after "Purpose:" in the description field. The newline characters either need to be escaped or removed or changed to spaces

Ken

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: newline in campaign description breaks campaign dashboard
May 04, 2011, 09:48:39 pm

can you file an issue. we'll fix for 3.4.2

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

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: newline in campaign description breaks campaign dashboard
May 05, 2011, 12:29:42 am
Created issue crm-8030

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • newline in campaign description breaks campaign dashboard

This forum was archived on 2017-11-26.