Closed (fixed)
Project:
Views attach
Version:
6.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2010 at 21:42 UTC
Updated:
4 Apr 2017 at 16:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
c4rl commentedI think the lesson here is that views_attach shouldn't be used as the principal method of rendering content for a node if previewing is going to be important.
Comment #2
beauz commentedI've got a site that requires this, is anyone able to explain to me why this is not possible?
Is there some method to get around it?
Comment #3
c4rl commented@beauz
The issue is that the Views Attach module often receives arguments from the node to populate the view. In the case of authoring a new node, the node does not yet exist in the database during preview and thus certain fundamental properties of the node (such as the node id) do not yet exist.
In my own use of this module, there were certain circumstances wherein I discovered writing a CCK formatter was a better solution to achieve similar functionality.
Comment #4
beauz commentedOk yep this makes sense...
The site i'm working on will on need the preview on existing nodes (node edit not node add) do you think there is any way to hack it just for this case?
Comment #5
becw commentedNo: because CCK fields aren't saved during a node preview (whether for a new node or updating an existing node), there is no way for Views to get the information.
Comment #6
gregglesSo, let's document it somewhere?
Comment #7
c4rl commentedAdded paragraph to README.txt
Comment #8
becw commentedI feel like that's a very use-case specific caveat; plus, nowhere else is Views expected to handle nodes in the "preview" state. But clearly folks are using Views Attach to render a replacement for node bodies, so maybe you've got a point.
Comment #9
gaurav.kapoor commentedThanks for the patch @c4rl , modified it lil according to coding standards.
Comment #10
gaurav.kapoor commented