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.

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Can you provide a recipe to setup one of those nodes?

sphopkins’s picture

Sure. 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:

NODE(X)
[title]
Fieldset A

<li>CCK Content type (date)
<li>CCK Content type (text)
<li>ViewField1 - View(a)

Fieldset B

<li>ViewField2 - View(b)
<li>ViewField3 - View(c)
<li>ViewField4 - View(d)
  ...

Fieldset C
  ...

And this displays properly as a node. When I click on the printer friendly icon all I get is the following node content:

[title]
Fieldset A
<li>CCK Content type (date)
<li>CCK Content type (text)
<li>ViewField1 - View(a)

The rest of the content is not displayed.

Doing some troubleshooting I find that if I arrange the node like this:

NODE(X)
[title]
Fieldset A

<li>CCK Content type (date)
<li>CCK Content type (text)
<li>ViewField1 - View(a)
<li>ViewField2 - View(b)

Fieldset B

<li>ViewField3 - View(c)
<li>ViewField4 - View(d)
  ...

Fieldset C
  ...

Then viewfield2 appears on the printer friendly page.

Hope that makes sense.

Thanks

sphopkins’s picture

Note that I have other content inside fieldsets in a CCK content type that is not a viewfield and all displays properly

e.g.:

NODE(X)
[title]
Fieldset A

<li>CCK Content type (date)
<li>CCK Content type (text)

Fieldset B

<li>CCK Content type (date)
<li>CCK Content type (text)
  ...

Fieldset C

<li>CCK Content type (date)
<li>CCK Content type (text)
  ...
jcnventura’s picture

Status: Postponed (maintainer needs more info) » Active
csc4’s picture

Subscribing

jcnventura’s picture

Title: Printer Friendly version does not load content from other nodes that are referenced via a view / tokens » drupal_render() does not contain all content from multiple viewfields
Project: Printer, email and PDF versions » Viewfield
Version: 6.x-1.8 » 6.x-1.x-dev

Hi,

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

sphopkins’s picture

Many thanks for looking into this.

I am hopeful of an eventual fix - I am willing to test as needed.

sphopkins’s picture

I 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.

darren oh’s picture

Assigned: Unassigned » darren oh
darren oh’s picture

Status: Active » Fixed

Fixed in CVS commit 295544.

darren oh’s picture

Status: Fixed » Needs review

Fix 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.

darren oh’s picture

StatusFileSize
new817 bytes

Forgot to attach patch.

darren oh’s picture

StatusFileSize
new927 bytes

Wrong patch.

sphopkins’s picture

That patch looks like it works for both the normal node and the printer-friendly version.

darren oh’s picture

Status: Needs review » Fixed

Fixed in CVS commit 297100.

Status: Fixed » Closed (fixed)

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