Using dompdf on my dev site (PHP 5.2.6, MySQL 5.0.67), PDF links work fine but these errors appear afterward when another page is generated:
), using dompdf (with _ deleted), the PDF links work great. But when I navigate to a different page, Drupal reports these errors:
* warning: DOMXPath::query() [domxpath.query]: Invalid predicate in /[mypath]/sites/all/modules/print/include/stylesheet.cls.php on line 573.
* warning: DOMXPath::query() [domxpath.query]: Invalid expression in /[mypath]/sites/all/modules/print/include/stylesheet.cls.php on line 573.
* warning: Invalid argument supplied for foreach() in /[mypath]/sites/all/modules/print/include/stylesheet.cls.php on line 575.
* warning: DOMXPath::query() [domxpath.query]: Invalid predicate in /[mypath]/sites/all/modules/print/include/stylesheet.cls.php on line 573.
* warning: DOMXPath::query() [domxpath.query]: Invalid expression in /[mypath]/sites/all/modules/print/include/stylesheet.cls.php on line 573.
* warning: Invalid argument supplied for foreach() in /[mypath]w/sites/all/modules/print/include/stylesheet.cls.php on line 575.
Here are lines 572-587:
// Retrieve the nodes
$nodes = $xp->query($query);
foreach ($nodes as $node) {
//echo $node->nodeName . "\n";
// Retrieve the node id
if ( $node->nodeType != 1 ) // Only DOMElements get styles
continue;
$id = $node->getAttribute("frame_id");
// Assign the current style to the scratch array
$spec = $this->_specificity($selector);
$styles[$id][$spec][] = $style;
}
}dOn my QA site (also PHP 5.2.6, MySQL 5.0.67), PDF links trigger a "white page of death" and the following error appears when another page is generated:
warning: require_once(/[mypath]/sites/all/modules/print/include/domdocument.cls.php) [function.require-once]: failed to open stream: No such file or directory in /[mypath]/sites/all/modules/print/dompdf_config.inc.php on line 194.
And indeed, there is no domdocument.cls.php file in the include. I even re-downloaded dompdf-0.5.1 to be sure.
I'm have removed the dompdf.php file as instructed and the contents of the dompdf tar is sitting in the root of /sites/all/modules/print (same directory where dompdf.php was sitting before I deleted it). Was I supposed to make any further changes?
Comments
Comment #1
jcnventuraThe warnings generated by dompdf are quite normal. See http://drupal.org/node/190173#domdpdfwarnings for the official answer and a possible solution.
As to the domdocument.cls.php, that's covered in dompdf's FAQ: http://www.digitaljunkies.ca/dompdf/faq.php#dom
João
Comment #2
jcnventuraNo further info received in two weeks. Closing the issue.