Given 2 workflows called WORKFLOW1 and WORKFLOW2 (by order of precedence).
I noticed that, when trying to create a new content that is normally managed by WORKFLOW2, it puts itself in the creation state of... WORKFLOW 1 !
After digging, I realized that function workflow_get_creation_state_by_type() doesn't do the SQL join properly as it just "inner joins" without join clause, and then takes the fist result, which is always WORKFLOW1.
I don't know if you'll be able to reproduce it but just read the code (line 820 of workflow.module) and you'll see the pitfall.
Here is a patch that corrects that simply.
Comment | File | Size | Author |
---|---|---|---|
workflow_fix_multiple_start_states_by_content_type.patch | 650 bytes | m42 | |
Comments
Comment #1
NancyDruThanks for the patch. However, one should prefer the ON clause to the WHERE.
I will commit this momentarily.
Comment #2
m42 CreditAttribution: m42 commentedYou're definitely right, that's much better.
Thanks for commiting it !
(Should I close this thread or leave it opened for comments ?)
Comment #3
NancyDruCommitted
Comment #4
m42 CreditAttribution: m42 commented@NancyDru: You know, it's a common use there to credit people for the work they've done and the time they spent.
But nevermind, it's not a run to the spotlights. May God bless you for your great job, honey ! ;)
Comment #5
NancyDruIf I left you off the commit, I apologize; I usually try to do so.
I did go back and update the release notes for 7.x-1.1-beta1.
Comment #6
NancyDruIncluded in 7.x-1.1-beta2.