Posted by merlinofchaos on November 10, 2005 at 12:20am
3 followers
| Project: | Workflow |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | jvandyk |
| Status: | closed (fixed) |
Issue Summary
Specifically ksort($choices) on line 151 doesn't like it when $choices isn't an array.
It leads to a design question, though: What should the module do if no workflow transition choices are available.
Comments
#1
We could either bail out or just display the current state.
I guess it depends on how much you want the user to be informed of the current state.
I'd lean towards bailing out and not displaying workflow in that case. You?
#2
I agree; I'd bail and not display the state.
Note that this can also cause issues if there is no valid creation state for the role, and a new node is being created. In that case, I think that the module should somehow try to guess what an acceptable creation state would be. Not quite sure how to go about doing that, though.
#3
The attached patch gets rid of the line 151 error. A function (workflow_field_choices) was returning the wrong data type.
I also agree with you guys about not displaying any info about the state if there aren't any transitions possible. Often this will be for a user who doesn't/shouldn't know about workflow.
#4
Applied patch and changed workflow_field_form() to bail out.
#5