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.

Comments

smithmilner’s picture

Status: Active » Needs review
smithmilner’s picture

Sorry for the long winded block of text above, this was mostly so I wouldn't forget later on.

johnv’s picture

Issue summary: View changes

..

johnv’s picture

Title: Nodes created before workflow gets installed are stuck on (creation) state » Nodes created before workflow gets installed are stuck on (creation) state (D6)
Issue summary: View changes

This is fixed in D7. D6 is not maintained anymore, but keeping this issue open for other D6-users.

johnv’s picture

Status: Needs review » Closed (won't fix)

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