Closed (fixed)
Project:
Printer, email and PDF versions
Version:
6.x-1.9
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2012 at 09:20 UTC
Updated:
16 Jul 2012 at 12:31 UTC
Hi
i would to use this module but it wouldn't:
for print version : only node content is printed...no views content
for pdf version : nothing is print with this warning
warning: include(sites/all/modules/print/includes/inc_ficheform_docs.php): failed to open stream: No such file or directory in /var/www/drupal6/sites/all/themes/Cyrano_ER/node/node-fiche_formation.tpl.php on line 25.
warning: include(): Failed opening 'sites/all/modules/print/includes/inc_ficheform_docs.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/drupal6/sites/all/themes/Cyrano_ER/node/node-fiche_formation.tpl.php on line 25.
warning: include(sites/all/modules/print/includes/inc_ficheform_deco.php): failed to open stream: No such file or directory in /var/www/drupal6/sites/all/themes/Cyrano_ER/node/node-fiche_formation.tpl.php on line 33.
warning: include(): Failed opening 'sites/all/modules/print/includes/inc_ficheform_deco.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/drupal6/sites/all/themes/Cyrano_ER/node/node-fiche_formation.tpl.php on line 33.
warning: include(sites/all/modules/print/includes/inc_region_col_G1.php): failed to open stream: No such file or directory in /var/www/drupal6/sites/all/themes/Cyrano_ER/node/node-fiche_formation.tpl.php on line 41.
warning: include(): Failed opening 'sites/all/modules/print/includes/inc_region_col_G1.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/drupal6/sites/all/themes/Cyrano_ER/node/node-fiche_formation.tpl.php on line 41.
warning: include(sites/all/themes/Cyrano_ER/includes/inc_ficheform_deco.php): failed to open stream: No such file or directory in /var/www/drupal6/sites/all/themes/Cyrano_ER/node/node-fiche_formation.tpl.php on line 33.
warning: include(): Failed opening 'sites/all/themes/Cyrano_ER/includes/inc_ficheform_deco.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/drupal6/sites/all/themes/Cyrano_ER/node/node-fiche_formation.tpl.php on line 33.
what's wrong with views embed ?
thanks
Comments
Comment #1
jcnventuraWhere are you using "includes/inc_ficheform_docs.php" that your custom templates try to include it during the print module rendering.. You probably have path problems in that include.
About the views content... How are you including it in the node?
Comment #2
jcnventuraNo further info in two weeks. Closing the issue.
Comment #3
aiphesthis is the code of includes/inc_ficheform_docs.php to embedding views :
Comment #4
jcnventuraThis is not where I think the problem is.. How are you including this file in /var/www/drupal6/sites/all/themes/Cyrano_ER/node/node-fiche_formation.tpl.php ?
Comment #5
aiphesby template suggestion file system , custom template.php file :
Comment #6
aiphesComment #7
jcnventuraHow can the line above create an include for 'includes/inc_ficheform_docs.php' ?
Comment #8
aiphesin the node.tpl:
Comment #9
jcnventuraThanks for finally answering the question I asked in #1, #4 and #7.
I think one of the reasons why you're not getting anything is that print is by design theme-agnostic, and will not initialize the $theme_path variable.. You can make sure in your node.tpl.php that the theme is initialized, by calling init_theme() directly.
In this case, your php file is not included because $theme_path is empty, so PHP tries to find it inside the print module directory, and of course it doesn't show anything..
Once you get this working, please test PDF again.. If that still fails, set this to active, and please tell me which PDF library you're using.
Comment #10
aiphessorry for my misunderstanding..
how can i initialize $theme_path in my theme ? is this init_theme() can do that and where can i paste it in my theme ?
thanks
Comment #11
jcnventuraYou can safely add init_theme() at the start of your node.tpl.php, or between the two lines you indicated in #8. That should make sure that $theme_path is set to the correct value.
Comment #12
aiphesis it good like this ?
Comment #13
jcnventuraIt should be.. With that, when using the print module, the $theme_path variable should have the correct value.
Comment #14
aipheshow can i check if the variable take the good value ? firebug or php debug code like print(); ?
Comment #15
jcnventuraprint it out just before doing the include.. When seeing it as a normal page, you should see the same value that you get when using the print module.
Comment #16
aiphesthere is an issue with this code in node.tpl...
actually print version doesn't display view content...it works on page.tpl not overrided by node.tpl
include(sites/all/modules/print/includes/inc_region_footer_actu.php): failed to open stream: No such file or directory dans /var/www/drupal6/sites/all/themes/CyranoD6_BL/node/node-page_affiche_mois.tpl.php à la ligne 95.for pdf version , seem not work at all...which pdf generator is better ? actually i try wkhtmltopdf-i386 in /sites/all/libraries for multisite install
Comment #17
jcnventuraFrom the original post:
and #16:
I know that this doesn't work with the print version using your node.tpl.php, this is what we've been discussing for 17 posts now.. I've been trying to help you and me to understand what the root of the problem is.
As to the best pdf tool, it's wkhtmltopdf, and it should work the same as the print version, but it may be that your web server can't run it for some reason. Check the logs to see if that's the case.
I'm not sure I can continue to help you.. This seems to be an issue with your code, and you don't seem to be capable of debugging your code without my help.
Comment #18
aiphesok i think i can fix this by replacing :
by
but i need help about syntax...
Comment #19
aipheswork for print version but not for pdf one...
Comment #20
jcnventuraWhat do you mean it does not work for PDF? How exactly does it not work?
Do you get any errors? See also /var/log/apache2/error.log, please.
Comment #21
aiphesfor pdf version the page is blank...nothing in /var/log/apache2
in watchdog :
wkhtmltopdf: Loading pages (1/5) [> ] 0% [======> ] 10% [=======> ] 12% QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" QAbstractSocket::connectToHost() called when already looking up or connecting/connected to "provence-formation.vmdev" [============================================================] 100% Resolving links (2/5) [============================================================] Page 1 of 1 Counting pages (3/5) [============================================================] Page 1 of 1 Printing pages (5/5) [> ] Preparing [===================> ] Page 1 of 3 [=======================================> ] Page 2 of 3 [============================================================] Page 3 of 3 DonePrinter, email and PDF versions - PDF generation library wkhtmltopdf 0.9.6
I think path issue is fixed no ?
Comment #22
jcnventuraI think so, but the PDF is empty because it can't connect to your vm.. Possibly to get images. I'd recommend that you configure your web server to allow access to itself. It seems at the moment that it can't connect to provence-formation.vmdev.
Comment #23
aiphesaccording to this : http://code.google.com/p/wkhtmltopdf/issues/detail?id=193&q=connecttohost
it's probably due to local server...on production one it works :)
thanks for your help
Comment #24
jcnventuranp.. Sorry for my lack of patience :) I'm glad you sorted out the problem.