Noticing this on my site. Any part of a node that is retrieved by a view using tokens for arguments does not load any of the views for display / printing / emailing. I have noticed this reported in the following issue #388096: It won´t print anything that I bring from other nodes (content_profile_load) but in my case it does not occur because of Organic Groups.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | viewfield.theme_.inc-568304-12.patch | 927 bytes | darren oh |
| #12 | viewfield.theme_.inc-568304-10.patch | 817 bytes | darren oh |
Comments
Comment #1
jcnventuraCan you provide a recipe to setup one of those nodes?
Comment #2
sphopkins commentedSure. Using CCK, ViewField, Token and Views modules.
I have two different node types - call it X and Y
Create a CCK X content type. Ensure that there is some CCK fields to display in the view.
Add some data to a new node of the content type X. Make the title 12345678 (mainly for demo purposes but any token enabled field is usable).
Create a View on that content type. Add some fields from that content type, filter based on the CCK content type X, and ensure that there is an argument for Node: Title.
Create a CCK Y content type. Create several CCK fields as a ViewField. Set the viewfields up to use the view that was just created. Ensure that the token replacement is [title].
Create a node of content type Y with a title of 12345678.
When you view the new node of content type Y you just created you should see the viewfields with the content of the node of content type X.
Pretty sure that this sounds correct from what I have done. In the end the node is structured like this for me:
And this displays properly as a node. When I click on the printer friendly icon all I get is the following node content:
The rest of the content is not displayed.
Doing some troubleshooting I find that if I arrange the node like this:
Then viewfield2 appears on the printer friendly page.
Hope that makes sense.
Thanks
Comment #3
sphopkins commentedNote that I have other content inside fieldsets in a CCK content type that is not a viewfield and all displays properly
e.g.:
Comment #4
jcnventuraComment #5
csc4 commentedSubscribing
Comment #6
jcnventuraHi,
I've discovered that drupal_render() only returns a partial set of the configured fields.. I don't understand why that happens, but that's the reason why you're seeing this behavior in the print module.
I am moving this to the viewfield module, as I believe that module's responsible for the display of the viewfields.
João
Comment #7
sphopkins commentedMany thanks for looking into this.
I am hopeful of an eventual fix - I am willing to test as needed.
Comment #8
sphopkins commentedI am unsure who within viewfield will be looking at this, and I am unsure what constitutes a critical bug, but this is very important and critical to me ;-)
Please contact me if I can test anything out.
Comment #9
darren ohComment #10
darren ohFixed in CVS commit 295544.
Comment #11
darren ohFix caused problem in normal node view. Here's a patch that seems to work in all cases. I'd like to know why token replacement can have this effect before making committing a change.
Comment #12
darren ohForgot to attach patch.
Comment #13
darren ohWrong patch.
Comment #14
sphopkins commentedThat patch looks like it works for both the normal node and the printer-friendly version.
Comment #15
darren ohFixed in CVS commit 297100.