CCK based nodes are printed without fields. this troubles many users, like me.

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Indeed it would, but I find it hard that this is now happening. It seems to be a duplicate of http://drupal.org/node/169629 or of http://drupal.org/node/71391.

What type of nodes are we speaking about, exactly? Book nodes or page nodes?

Thanks,

João

Stealth AIDS’s picture

Status: Postponed (maintainer needs more info) » Active

That's about CCK pages included in books.
That's may be a bug. CCK nodes are printing correctly until I include them into book. Since book navigation appears, "book" and "printer-friendly" show only title and text, without fields.

Stealth AIDS’s picture

Thank you. My trouble looks like http://drupal.org/node/71391

jcnventura’s picture

Title: CCK support » CCK support in book nodes printer-friendly version
Project: Printer, email and PDF versions » Drupal core
Version: 5.x-3.0 » 5.3
Component: Miscellaneous » book.module
Category: feature » bug

Sorry to tell you, but I really can't do any more..

The print module is now assuming control of the book PF link, but I still use the book module's export to HTML features. These will have to be fixed in that module. When it works with the print module 'take control of book PF links' disabled, it will also work with it enabled.

I am moving this issue to the appropriate place (Drupal project -> book.module)

João

jcnventura’s picture

Status: Active » Needs review

Actually, can you try replacing the book_node_visitor_html_pre for the following in drupal/modules/book/book.module ?

function book_node_visitor_html_pre($node, $depth, $nid) {
  $node = node_build_content($node);

  // Allow modules to make their own additions to the node.
  node_invoke_nodeapi($node, 'print');

  $output .= "<div id=\"node-". $node->nid ."\" class=\"section-$depth\">\n";
  $output .= "<h1 class=\"book-heading\">". check_plain($node->title) ."</h1>\n";
  $output .= drupal_render($node->content);

  return $output;
}
Stealth AIDS’s picture

sorry for flooding. I got troubles with posting in Opera 9.

Stealth AIDS’s picture

CCK fields are visible

Stealth AIDS’s picture

Since i replaced that code, behevior approached to expected.
Per-page links, like "prew. title" "up" and "next title" are left in print version too. This is bad, i think, but no so much, as it was before.
Shall I rememeber this like a hack, or this will be included in future versions somehow?

jcnventura’s picture

Project: Drupal core » Printer, email and PDF versions
Version: 5.3 » 5.x-3.0
Component: book.module » Code

I will include the fix for this in the print module soon.

Once the fix there works, it might become part of Drupal 5.4.. We'll come back to this. In the mean-time, I am moving it to the print module again.

João

Stealth AIDS’s picture

Thank you again!

jcnventura’s picture

Status: Needs review » Fixed

Hello,

Can you try the latest dev release in your pages? The function to render the CCK pages should now be working OK. You can revert your book module to the original version, since the book module is working perfectly. The problem is actually in the CCK module, which doesn't correctly handle the 'print' nodeapi call.

Please wait a couple of hours if the dev release is still dated Nov-22.

Joao

Anonymous’s picture

Status: Fixed » Closed (fixed)

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