I you remember, we have run into this before. In 1.5, nodereferenced content now is only printed as a simple list (instead of teaser or full node as configurated).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,

Yes we had discussed nodereference under #359343: A few things broken(?) in the lastest dev release.

The reason why it came up again is the same.. There's this thing called $node->build_mode, which the Drupal 'politburo' wants me to use (first it was moshe weitzman and now pwolanin (see #428024: hook_link and hook_nodeapi problems).

I can remove the flag again, but really the problem is in the nodereference definition itself. The build_mode is there as a way to signal to the content generator what type of information to include.. Why is it reducing the list to a simple list for the print view?? This needs to be fixed in the appropriate module, I just don't know if it is CCK or Views.. I am guessing that you're creating the content with nodereference fields in CCK, but it is Views that creates the list which is being 'printed'. Am I right?

João

skyredwang’s picture

Status: Postponed (maintainer needs more info) » Active

Joao,

I used nodeference to create lists. There is no Views stuff in the display. It is just nodeference CCK formatter. It has options to display simple list, teaser, or full node. Everything is out of box, no customizations.
Please feel free to let me know if you need any information

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

I am trying to reproduce this, but I seem to be unable to find out where can I configure the nodereference list to show up as something other than a simple list.. Where is the configuration for teaser or full mode?

João

skyredwang’s picture

Status: Postponed (maintainer needs more info) » Active

Content Types => edit myType => Display fields

jcnventura’s picture

Status: Active » Fixed

Hi,

I have discovered the problem in CCK's code and submitted a fix. Let's hope they accept it. The issue there is #441412: Support Drupal core's NODE_BUILD_PRINT build mode.

In the meantime, I am disabling the print build mode in this module, at least until CCK fixes the above issue.

João

skyredwang’s picture

Version: 6.x-1.5 » 6.x-1.6

João,

Since you dropped CCK build_mode support in 1.6, I am pretty screwed. Because I cannot print out a nice list of nodereferenced content anymore. I am wondering if you could let me know how to temporarily hack the 1.6 version to work with nodereference as 1.4 did? Or do you recommend me to stay on 1.4 for a while?

skyredwang’s picture

Joao,

I don't know what's going on with the node_build mode, but 1.6 partially with nodereference (again)? I upgrade my dev site to 1.6, and print out a pdf for http://greatbrewers.com/list/47797 , please see the attachment.

Please notice that: there are three items, only two of three are printed (see attachment).
also, the node title has characters escaping bug

skyredwang’s picture

Status: Fixed » Active
jcnventura’s picture

I am guessing the node title bug is caused by the security advisory that resulted in the creation of version 1.5.. The security team required me to use check_plain for anything that might be output as a an HTML page title.. Since I re-use the node title as the document title in TCPDF, it gets printed like that.. I will try to revert the PDF title back to a usable version in a way that doesn't force me to undo that security change.

To try to see if this problem is Drupal+CCK+print related, are the three images being correctly shown in the web version? I am actually seeing three items (not two as you mentioned) in the PDF you sent me, but the image for the middle one is not shown and I am guessing that an empty page is being inserted where it stood (for some strange reason). I am also noticing that the name of that middle beer includes a single quote, so it may be that the other problem wasn't solved as correctly as I thought.. I see you're using TCPDF 4.5.036, can you try to upgrade to TCPDF 4.6.006, so that at least I am generating the same stuff you are

João

PS: BTW, I haven't told you this, but I admire your patience.. I would have dumped my module a long time ago, for all the trouble I have caused you. On the other hand, you're really helping to make the PDF generation something useful, so thanks.

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Uhhh.. I just tried the PDF version of http://greatbrewers.com/product/real-ale-firemans-4, and it seems that TCPDF can't find the image so that's why it is not inserting one (I would like to know why it decided to print a blank page instead...).

What's the name of that file? Apparently it isn't /home/greatbre/public_html/sites/default/files/images/Real-Ale-Fireman's-4.preview.png

João

skyredwang’s picture

Status: Postponed (maintainer needs more info) » Needs work

After upgrading to TCPDF 4.6.006, all the images are printed! So, it wasn't Print Module's bug.

But the title remains ugly.

Other problems you mentioned were because you were looking at my Live Site, which currently uses TCPDF 4.5 + Print 1.4

Anyway, also thanks a lot to you, I appreciate your patience and hard work!

jcnventura’s picture

Status: Needs work » Active

Please don't use needs work if you're not providing a patch..

jcnventura’s picture

Status: Active » Fixed

Just committed a simple change that gets rid of the HTML entities in TCPDF's title..

Please don't re-open this issue as the nodereference problem is already fixed in 1.6..

João

Status: Fixed » Closed (fixed)

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