Token not replaced when value is not available

Created on 1 May 2013, over 11 years ago
Updated 26 August 2024, 5 months ago

I use the wkhtmltopdf library with tokens in the header text.

If a value is not available, the token is not replaced.

I solved this problem by changing line 30 of lib_handlers\print_pdf_wkhtmltopdf\print_pdf_wkhtmltopdf.pages.inc. by adding the option array('clear'=>true). See http://api.drupal.org/api/drupal/includes!token.inc/function/token_repla... for documentation.

    $wkhtmltopdf_options = token_replace($wkhtmltopdf_options, array('node' => $meta['node']), array('clear'=>true));
🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024