Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
#7 | GreatBrewers.com_-_laundry039s_Seafood_-_2009-04-27.pdf.tar_.gz | 968.33 KB | skyredwang |
Comments
Comment #1
jcnventura CreditAttribution: jcnventura commentedHi,
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
Comment #2
skyredwangJoao,
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
Comment #3
jcnventura CreditAttribution: jcnventura commentedI 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
Comment #4
skyredwangContent Types => edit myType => Display fields
Comment #5
jcnventura CreditAttribution: jcnventura commentedHi,
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
Comment #6
skyredwangJoã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?Comment #7
skyredwangJoao,
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
Comment #8
skyredwangComment #9
jcnventura CreditAttribution: jcnventura commentedI 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.
Comment #10
jcnventura CreditAttribution: jcnventura commentedUhhh.. 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
Comment #11
skyredwangAfter 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!
Comment #12
jcnventura CreditAttribution: jcnventura commentedPlease don't use needs work if you're not providing a patch..
Comment #13
jcnventura CreditAttribution: jcnventura commentedJust 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