Hi, there is a call to language_default() in print_pdf.pages.inc; I get following error (language_default() is a Drupal 6 function):

Fatal error: Call to undefined function language_default() in sites/all/modules/print/print_pdf/print_pdf.pages.inc on line 71

The error comes out when I try to generate the PDF version. Removing the call to the undefined function seems to resolve the problem:

@@ -68,7 +68,7 @@
     $pdf_filename = str_replace('/', '_', $path) .'.pdf';
   }
   if (function_exists('transliteration_clean_filename')) {
-    $pdf_filename = transliteration_clean_filename($pdf_filename);
+    $pdf_filename = transliteration_clean_filename($pdf_filename,  language_default('language'));
   }
 
   if (basename($print_pdf_pdf_tool) == 'dompdf_config.inc.php') {

Comments

jcnventura’s picture

Status: Active » Fixed

Hi,

Thanks for the patch. I guess you're the first one since I merged #835470: Transliterate generated PDF filenames if transliteration module is enabled a month ago that actually uses Drupal 5 and the transliteration module.. Unfortunately, my D5 install is limited as my main test rig is PHP 5.3 based and Drupal 5 is simply unusable in this version.

I've committed it to CVS.

João

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.