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 CiviReport (Moderator: Dave Greenberg) »
  • PDF Report blank when using minimum_fee token
Pages: [1]

Author Topic: PDF Report blank when using minimum_fee token  (Read 1439 times)

stuart

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3
PDF Report blank when using minimum_fee token
January 26, 2012, 04:26:31 am
If I include the token {membership_type.minimum_fee} in my message template, the PDF Report is blank when produced.

I can include {membership_type.name} without problems, it's just the minimum_fee token which causes issues. I thought it might be because some of the minimum_fee values were set to NULL, but setting them to 0 has made no difference.

I've tried viewing the queries in my browser using CIVICRM_DAO_DEBUG, but I get a massive list of queries (which I can't see anything wrong with), and then a message that the PDF can't be produced because the headers have been sent (obviously just caused by the browser being sent a debug webpage).

Anyone have suggestions of what might be wrong, or how I should debug the PDF? Thanks.

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: PDF Report blank when using minimum_fee token
January 26, 2012, 11:26:56 am

Can you see what HTML is being sent when the PDF is blank and tweak that to see what changes are needed to generate the PDF

Might want to upgrade to the latest version of dompdf and see if that fixes the issue

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

stuart

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3
Re: PDF Report blank when using minimum_fee token
January 27, 2012, 03:28:46 am
If I remove the token {membership_type.minimum_fee} from the HTML template it starts working. But we need to display this token in the PDF, to let members know the price.

Just tried upgrading to DOMPDF 0.6 beta 2, didn't fix the problem unfortunately.

stuart

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 0
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3
Re: PDF Report blank when using minimum_fee token
February 02, 2012, 08:17:21 am
I debugged the code before the HTML gets sent to DomPDF, and the HTML contains a "?" broken character where I'm presuming the currency icon should be in minimum_fee. Presumably this is why the PDF is blank, as DomPDF can't accept invalid HTML.

I've tried changing the Default Currency to USD in localization (it's normally GBP), and also changed the "Monetary Amount Display" format to not include the currency symbol, but none of this has made a difference.

Does anyone know which function replaces template tokens with the CiviCRM values?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • PDF Report blank when using minimum_fee token

This forum was archived on 2017-11-26.