[development] Use revisions to replace previews
pwolanin at gmail.com
Fri Jun 8 17:56:45 UTC 2007
I think the real issue for D6 is not so much what you highlight,
since as I understand it, all _submit functions get called for the
preview so that the form data can be transformed into the correct
structure. If there are any modules whose data looks different at
this point from when the node is being loaded or saved, that's a bug
(in my mind, at least).
Here's an issue related to node previews in D5 if anyone has an
On 6/8/07, David Strauss <david at fourkitchens.com> wrote:
> The problem is that the current system is *almost* but not quite giving
> you what you will see when you save the node. It's difficult to give
> accurate previews. By running previews on the same system as revisions,
> previews will be 100% accurate and require no additional work to provide.
> Another way we could structure previews accurately without the DB
> overhead of using revisions is to separate the node edit form submission
> from what changes in $node. Basically, submitting the form (for preview
> or saving) would call the function to apply the form submission to $node.
> How it would work:
> 1. User submits node edit form.
> 2. The content type provider receives the submitted form values and
> applies them to $node.
> 3. The normal rendering happens on $node.
> Right now (and I may be mistaken for Drupal 6), elements on the node
> edit form get directly added to $node. When a preview is happening, the
> preview is built off this edit-form-modified $node, which often has a
> different data representation than $node really uses. So, the preview is
> put in the awkward position of interpreting the form and displaying the
More information about the development