Hi there!
I´ve been using print for some time now, but this is actually my first time with pdf support.
I´m using TCPDF.
I´ve added two views inside my node: One of them using "Views Insert", so it is embedded inside the body field, and the other it´s added inside the theme using module_invoke.
The second one it´s completely ignored by the printed version, and the first one (the one embedded inside the Body) shows just the Empty Text area of the view, but the view has content, and it is shown inside the normal node view.
This happens in both cases, by both core printed and pdf version.
I really cannot use this until it shows the views too. (I know there isn´t support for Views2 by the moment, that´s why I thought it could be embedded...
Is there something I can do about it?
Thanks!!!!!
Rosamunda
Comments
Comment #1
jcnventura CreditAttribution: jcnventura commentedHi,
Regarding the second view.. Whatever you do in your theme is ignored by the module, so it will never show up and that's the desired behavior. If what you're doing is theme-dependent, then it should not be considered part of the content, and thus it should not be displayed in the print view.
If you consider it part of the content, then you're completely breaking the architecture model of Drupal and I can't help you with it.
About the first view... It should show something, and the fact that it doesn't may mean some problem with the view itself.. Can you provide more details about this view?
João
Comment #2
Rosamunda CreditAttribution: Rosamunda commentedThanks for your reply Joao :)
Yup, I can tell what I think it´s the problem: One of the filter´s view is "Grupos: OG: Posts in current group".
I can tell about that because, when I take off that filter, the view shows normally.
But that filter is indispensable for the view to show up correctely, is there something to be done?
Thanks again!
Rosamunda
Comment #3
Rosamunda CreditAttribution: Rosamunda commentedsorry, again, forgot to change the status (too much caffeine)
Comment #4
jcnventura CreditAttribution: jcnventura commentedI need to ask some help from the Organic Groups people as to what I need to do here..
Basically, the print-module recreates the page - based on the node ID/path - and displays only the content.. It seems that I would need to 'inherit' the group membership of the original page.
Is this feasible, or is it against OG's architecture model?
João
Comment #5
Rosamunda CreditAttribution: Rosamunda commentedI would like some feedbak about if it´s really an OG issue or not. Anyone..?
Comment #6
moshe weitzman CreditAttribution: moshe weitzman commentedI cannot parse out a question from this. Note that you can get group context for a page with og_get_grouop_context(). You can set it with og_set_group_context(). And that filter automatically sets context.
Comment #7
jcnventura CreditAttribution: jcnventura commentedHello moshe,
Sorry for not making it clear. The situation is that the user is finding a difference in the way that the PF version behaves because the generated page is not a member of an Organic Group. The og_get_group_context doesn't work as it doesn't take any arguments. However digging in from that point in the module's code, I think that the following code would do the trick:
I will try it and if it works, I'll add it to the print module.
João
Comment #8
Rosamunda CreditAttribution: Rosamunda commented... and I would be very grateful for your effort, patience and kindness!! Thanks!!
Rosamunda
Comment #9
jcnventura CreditAttribution: jcnventura commentedBringing it back to the print module, so that I don't forget this..
Comment #10
jcnventura CreditAttribution: jcnventura commentedHello Rosamunda,
I need your help in testing this.
Please add the following line to print.pages.inc, around line 560, just below
$node->printing = TRUE;
.And then try those embedded views to see if they start working..
João
Comment #11
Rosamunda CreditAttribution: Rosamunda commentedRight away Joao! Thanks for your efforts!!
Comment #12
Rosamunda CreditAttribution: Rosamunda commentedI´ve added that line, and the text version is ok :)
But the pdf isn´t working. I mean, there is no output of that view at all. It´s just blank (but it will show up at the default, normal web version of the node).
Comment #13
jcnventura CreditAttribution: jcnventura commentedThe important part of making it work is the HTML version, as that is the input provided to the PDF generator.
What happens with the PDF? Is it completely blank, or only the view is blank? TCPDF can be picky with some HTML.
Can you attach to this issue a 'Save source' of the now working page? Only the HTML, don't ask it to save the page complete, as that changes the paths.
João
Comment #14
Rosamunda CreditAttribution: Rosamunda commentedI´m actually using dompdf-0.5.1 because of html thingies that did handle it better than tcpdf.
The pdf isn´t completely blank, the views content just won´t appear, but the rest (the node title, body and the rest cck fields) they actually appear quite ok.
I didn´t understand what you mean with the html. It´s just the node html output? Because it shows all content as plain html with no reference whatsoever to views. The output is just a table.
I´ll paste the output that shows up the view content, when I ask for the page source code. Please tell me if this is what you are referring to or not.
Thanks for your help!
Comment #15
jcnventura CreditAttribution: jcnventura commentedSorry, but I don't understand.. Can you at least attach a screenshot of what I should see (the web version) and the problem (the PDF).
Anyway, I have just committed the organic groups fix, so this is mostly fixed once the above problem is understood.
Comment #16
jcnventura CreditAttribution: jcnventura commentedTwo weeks without further info.. Closing the issue.
Comment #17
Rosamunda CreditAttribution: Rosamunda commentedHi again,
After going a bit crazy and forgeting to respond to this issue, for wich I sincerely apologize, I´m back.
I´ve read and re read all over again, and installed this module again in a fresh install, with this module, cck, views and Organic Group. I´ve used the stable and then the dev version.
I´ve used the 2.0 version of OG.
To explain this in a very easy way: when the node shows the group where that post belongs, the print version won´t show it. Even in a default OG installation.
When you install OG and create a group, and then you post stuff into it, each node show to what goup or groups that post belong. That´s default behavior for OG and all themes that I´ve tried. (The node shows it in the same way that it shows taxonomy I may add).
When you click on the printed version, it won´t show that line of code that belongs to that node´s body content.
Again, I apologize for letting this issue to be closed!
Obrigada :)
Rosamunda
Comment #18
itsnotme CreditAttribution: itsnotme commentedSubscribing - the print output of a node loses the group context, which can seen at the missing group > groupname elements in the breadcrumbs. Therefore, something like
Doesn't work either. Possilby there's an easy solution but I don't have it right now :)
Comment #19
jcnventura CreditAttribution: jcnventura commented