[development] Use revisions to replace previews

Jeff Eaton jeff at viapositiva.net
Sat Jun 9 19:45:21 UTC 2007


On Jun 9, 2007, at 2:05 PM, David Strauss wrote:

> Jeff Eaton wrote:
>> This is, in fact, how Drupal 6 works. :) Modules that need to shuffle
>> their form data around before it can be considered a valid node  
>> object
>> add a #submit handler to the node edit form. That code is called  
>> by both
>> the preview and submit buttons when clicked, and results in a 'fully
>> formed' node object when preview is clicked.
>
> What happens if multiple modules need to shuffle the form date into
> $node? Is there a way to chain #submit events?
>

form #submit can have 0-n handlers, so any number of modules can  
modify the data; enforcing particular call order would involve the  
same weighting issues that any view, safe, etc hook requires.


>
> The problem with treating drafts as purely a workflow state is that
> drafts, ideally, should be able to co-exist with the published node.
> Having two coexistent versions of a node requires using revisions.
>

That seems like it makes sense, but I would say that having drafts in  
addition to a published nodes doesn't *require* revisioning, it *is*  
revisioning. Each version can have a workflow state -- draft being  
one of them. I just disagree with treating them as the same problem  
-- versioning won't solve our workflow needs, nor will workflow solve  
our versioning needs. They're complimentary but different.

I might have come in at the wrong time on a discussion I don't fully  
understand -- it's possible I'm just repeating what everyone else is  
saying. ;)

-Jeff


More information about the development mailing list