After install, upload necessary files, then configure print setting this module causes configuration to White Screen of Death. Upon reviewing what modules were installed, 1 at a time I renamed and refreshed until I found the cause. Looks like there is a bug in the printer module. If this has happened to some one else, let me know how to fix. I would like this feature in my new website.

CommentFileSizeAuthor
#12 print-token-wsod-1545466-12.patch461 byteskoppie
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

macdee’s picture

I encountered the same problem today when visiting the configure page after a fresh install.

After some digging I found a workaround/hack that worked for me and may get you going if you're not adverse to editing a file, but it's not a proper fix (disclaimer). There seems to be a problem with displaying available tokens on the configuration page but I'm not exactly sure what.

Simply comment out or delete the line of print_pdf/print_pdf.admin.inc (around) line 245 where it says '#token_types' => array('node'),

tarausa’s picture

I wonder if this will be fixed of if I have to remove this module from my program?

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

This doesn't occur to me.. Would it be possible to ask you what's the content of the webserver's error log when you encounter this problem?

macdee’s picture

I uncommented the above mentioned line and visited admin/config/user-interface/print/pdf

the error in the log was "PHP Fatal error: Out of memory (allocated 228589568) (tried to allocate 32243794 bytes) in .../includes/cache.inc on line 463"

This was with a php memory limit set at 512M, I upped it to 1000M but still the same error was produced.

( Since, in my case, available memory seems to be capping out at around the 200M mark despite the higher php setting, it may just be hitting a different limit set by the hosting provider, but that's a different issue...)

I'm guessing that the real problem is coming from tokens ( perhaps Prevent recursive tokens ) and not your module.

jcnventura’s picture

@macdee: clearly it must be some problem with the tokens indeed.

tarausa’s picture

Here is the errors
form 05/08/2012 - 13:04 Illegal choice sites/all/modules/print/tcpdf/tcpdf... Tara
Type form
Date Tuesday, May 8, 2012 - 13:03
User Tara
Location http://usaofpa.com/admin/config/user-interface/print/pdf?render=overlay&...
Referrer http://usaofpa.com/admin/config/user-interface/print/pdf?render=overlay
Message Illegal choice sites/all/modules/print/tcpdf/tcpdf.php in PDF generation tool element.
Severity error

form 05/08/2012 - 13:03 Illegal choice sites/all/modules/print/tcpdf/tcpdf... Tara
Type form
Date Tuesday, May 8, 2012 - 13:04
User Tara
Location http://usaofpa.com/admin/config/user-interface/print/pdf?render=overlay&...
Referrer http://usaofpa.com/admin/config/user-interface/print/pdf?render=overlay
Message Illegal choice sites/all/modules/print/tcpdf/tcpdf.php in PDF generation tool element.
Severity error

jcnventura’s picture

Title: After install print module and configure print setting this module configuration goes to White Screen of Death » (Re)moving the configured PDF tool creates a WSOD in the settings page
Status: Postponed (maintainer needs more info) » Active

@tarausa: apparently, the tcpdf.php path that had been configured/installed before is no longer in the same path. I never thought it would be a severe error though... I'll need to create an easy fix of checking if the variable is in the options array before setting that as the default value.

In the meantime, you can either install tcpdf in the above path (sites/all/modules/print) or disable print_pdf then uninstall it.. That should delete the variable for you.

If you're confortable with MySQL, you can try to find the print_pdf_pdf_tool variable in the "variable" table of your Drupal database and delete the record directly, so that you don't lose the rest of the print_pdf module settings.

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Actually, this isn't an error at all in my setup (not even a warning).. There must be something else interfering here.. Did one of the above suggestions fix it for you?

tarausa’s picture

I think I have an easy fix.
Go to your directory
/sites/all/libraries
rename tcpdf to tcpdf_

Download the dompdf library and place in /sites/all/libraries
Refresh your page, should now work.

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Fixed

OK. Marking this fixed then.

Status: Fixed » Closed (fixed)

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

koppie’s picture

Title: (Re)moving the configured PDF tool creates a WSOD in the settings page » After install print module and configure print setting this module configuration goes to White Screen of Death
Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Closed (fixed) » Needs review
FileSize
461 bytes

I had the same problem. The solution offered in #9 is just a workaround and didn't solve the problem for me. I'm also changing back to the original title because I don't think @jcnventura properly identified the problem in #7. Either that, or there are multiple problems with the same symptom. Either way, the only "real" solution is the one offered in #1: comment out a line from print.admin.inc. @Macdee is correct, it is an incompatibility with the Token module. I wonder if there was a breaking change in Token at some point? But Token itself works fine; the wsod is caused by this module, so the solution should come from here as well.

I'm changing this to the 2.x branch. Here's a patch for the latest dev version. I simply commented out the offending line. I felt a comment would be better than a deletion in case someone else wanted to come back and fix the code. Anyway this solution worked for me, hopefully it will work for anyone else who has this problem.

jcnventura’s picture

Status: Needs review » Postponed (maintainer needs more info)

What version of token are you using? Do you have the node module enabled?

I just tested this perfectly with token 7.x-1.5, and it works fine. I believe that deleting that line fixes something for you, but the line itself is not the problem.

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

No further info in more than two weeks. Closing the issue.

TechnoTim2010’s picture

Issue summary: View changes

Hi

I had this issue with the Pathauto patterns tab as well as the pdf tab of this module.

The solution in #4 above works, the linked issue can be found here https://drupal.org/node/1058912 which suggests loading the Token tweaks module https://drupal.org/project/token_tweaks

I resolved my issues by setting the token level to 2

I suggest this is a better solution than those suggested here.

Tim