Paging module uses $node->page_count, but Printer-Friendly pages unsets $node->pages_count (line 699 in print.module) which results in a broken print version of nodes using the pading module.

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Yes,

That's on purpose because others have requested that the entire article be present in the printer-friendly version, and not only the current view (see http://drupal.org/node/117236).

I haven't used the paging module since I fixed that one, so I am not sure what you mean by 'broken'. Do you mean that it doesn't work, or that it is displaying the complete article?

João

ugerhard’s picture

that the entire article be present in the printer-friendly version

Yes, that's the desired result :-)

Broken means:

printer.modules does unset($node->pages_count);.

But paging.module looks for $node->page_count and not $node->pages_count (note the superfluous s: "page" vs. "pages").

Because of that there is a pager in the print view of a paged node, but an empty node body (because print.module unsets $node->pages, which is correct).

If you change line 699 in print.module from

unset($node->pages_count);

to

unset($node->page_count);

everything works fine.

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Fixed

Hi.

I feel stupid. :)
After I wrote my reply, I re-read your issue again and the problem is so clearly written that I don't understand how I couldn't understand it.

I have already committed the change to CVS, so the latest dev will have it fixed later tonight..

Thanks a lot!

João Ventura

ugerhard’s picture

Great, thanks :-)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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