Closed (fixed)
Project:
Printer, email and PDF versions
Version:
7.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Oct 2011 at 10:31 UTC
Updated:
5 Nov 2011 at 08:20 UTC
There seems to be a bug in print.module when current page only setting is enabled.
The line in question (351) reads:
$path = ($print_html_link_use_alias && isset($node->path)) ? $node->path : $node->nid;
Meanwhile, $node is not exposed to print_node_view_alter().
My solution was to user $build['#node'] instead, so the line reads
$path = ($print_html_link_use_alias && isset($build['#node']->path)) ? $build['#node']->path : $build['#node']->nid;
Not sure if it's correct though, so no patch for now.
Comments
Comment #1
jcnventuraIndeed, I hadn't yet tested that option in the D7 version..
Thanks for reporting the problem! I've fixed it in git now.
Comment #2.0
(not verified) commentedAdding line number.