I ran into this problem on a project I am working on and I duplicated it on a clean install to confirm this is a real bug.
Criteria:
- Nodes pre-date the workflow being assigned to the content type.
- There is only 1 transition available from (creation)
If you create a few nodes and then create a workflow and add it for the content type of those nodes, they can't be given the next workflow state. Workflow hides the workflow form elements when there is only 1 state transition available (for example the (creation) -> (?? any state) transition). This is because the logic that normally moves a node from (creation) -> (?? any state) is found in hook_nodeapi with an operation of Insert. Which works fine for new nodes, however it is broken when hook_nodeapi operation Update because of a missing property from the hidden form element (#parents). That means old nodes are stuck on (creation), and the only transition available is hidden from users. I'm submitting a patch that autoselects the first available state if the node's current state is invalid and adding the #parents property to the hidden form element so hook_nodeapi recognizes it properly.
| Comment | File | Size | Author |
|---|---|---|---|
| workflow-old-nodes-stuck-creation.patch | 1.55 KB | smithmilner |
Comments
Comment #1
smithmilner commentedComment #2
smithmilner commentedSorry for the long winded block of text above, this was mostly so I wouldn't forget later on.
Comment #3
johnvCrossposting:
#1036580: Impossible to change workflow type for old nodes
#1566336: Nodes created before workflow gets installed are stuck on (creation) state (D6)
Comment #3.0
johnv..
Comment #4
johnvThis is fixed in D7. D6 is not maintained anymore, but keeping this issue open for other D6-users.
Comment #5
johnvI wish there was a nicer way to clear the issue queue from 'D6-issues that are fixed in D7' then a "won't fix for D6."