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 CiviCase (Moderator: Dave Greenberg) »
  • "generate report" error when ampersand is in client name
Pages: [1]

Author Topic: "generate report" error when ampersand is in client name  (Read 1367 times)

david.a.king

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
  • CiviCRM version: 3.4.5
  • CMS version: drupal 6.22
  • MySQL version: 5.2
  • PHP version: 5.3
"generate report" error when ampersand is in client name
January 07, 2012, 03:04:36 am
I'm getting an error:

Code: [Select]
warning: DOMDocument::loadXML() [<a href='domdocument.loadxml'>domdocument.loadxml</a>]: xmlParseEntityRef: no name in Entity, line: 3 in /civicrm/sites/all/modules/civicrm/CRM/Case/Audit/Audit.php on line 24.
when i try to "generate report" on any case where the client (not sure about others involved) has an ampersand in its name (x & x)

this might be related - http://issues.civicrm.org/jira/browse/CRM-6541 but i'm not sure exactly what was done to solve the issue..

any ideas?

using v3.4.5

thanks,
david

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: "generate report" error when ampersand is in client name
January 07, 2012, 09:11:28 am

seems like the code is not escaping the &

can u take a look and create a patch to fix the issue

thanx

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

demeritcowboy

  • Ask me questions
  • ****
  • Posts: 570
  • Karma: 42
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, still evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1 / 5.5
  • PHP version: 5.3, usually on Windows
Re: "generate report" error when ampersand is in client name
January 09, 2012, 03:18:45 pm
Can you try changing line 28 in templates/CRM/Case/XMLProcessor/Report.tpl from

Code: [Select]
<Client>{$case.clientName}</Client>
to

Code: [Select]
<Client>{$case.clientName|escape}</Client>
and see if that fixes it?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCase (Moderator: Dave Greenberg) »
  • "generate report" error when ampersand is in client name

This forum was archived on 2017-11-26.