I used workflow in the past in Drupal 5 and 6 but now, in Drupal 7 I'm really lost.

I've created a simple workflow with three states and I've assigned it to a content type. But, logged as admin, I can't see any kind of button to change the state of the node when editing it nor in workflow tab. The same occurs when I try to asign role permissions to different states, I can't find the option.

I'm using the standard Drupal 7 theme for administration and I have all the submodules of workflow activated.

Regards and thanks in advance.

CommentFileSizeAuthor
#17 translate.jpg57.4 KBxqbzzr
#8 workflow_feature.zip2.9 KBAnonymous (not verified)
#5 workflow.png97.25 KBAnonymous (not verified)

Comments

Anonymous’s picture

I'd like to bump this. I just went through this myself, and I'm getting the impression that this is the designed behavior, i.e. you are expected to write your own custom action to change the state of the node (publish/unpublish, etc). Can the module writer confirm this? Thanks.

Bastlynn’s picture

Those options should be available, they haven't been removed. I'll check it later tonight just to be sure but they should be there. If you're doing any additional form alters on those node types it may be worth checking that code for anything that could be removing the options.

Bastlynn’s picture

If you haven't already, try a cache clear too in case there's something stuck there?

Anonymous’s picture

No, I just tried it on a fresh install. Yes I did clear cache. I tried both the 1.0 and 1.x-dev. I basically followed the README, setting up a two-state workflow (draft/done).

Anonymous’s picture

StatusFileSize
new97.25 KB

Screenshot attached. I will export a feature with my workflow shortly.

Bastlynn’s picture

Wait - the screen shot you're showing is for triggers? I thought you were having trouble seeing the forms to change state on node edit and the tab at node view?

Bastlynn’s picture

If the issue is triggers, please see this issue (and patch) : http://drupal.org/node/1380954

Anonymous’s picture

StatusFileSize
new2.9 KB

Here is my workflow as a feature.

Anonymous’s picture

OK the original poster mentioned the workflow tab. I thought he was talking about the triggers workflow tab. Looks like a know issue then?

NoRandom’s picture

Started from scratch and here are the exact steps:

  1. Install workflow module
  2. Activate workflow, " access, " UI, " views (since I just want a moderation queue for certain contents)
  3. Add workflow "test workflow"
  4. Add states "not revised, aproved, blocked"
  5. Add the workflow to a content type, just for content not comments
  6. I can see the tab "workflow" above desired content but, inside the table of states evolution has no content (logically) but there is no button.
  7. Same happens inside edit tab, standard options, no extra buttons or forms.
  8. Clear all caches, nothing changes.
  9. I haven't changed anything about edit forms in my template, anyway I've revert to Bartik standard theme and I can see this error message (I haven't implemented notification area yet into my custom theme):
    Notice: Undefined property: stdClass::$workflow in workflow_node_insert() (line 347 of D:\foo\sites\all\modules\workflow\workflow.module).
    Notice: Trying to get property of non-object in workflow_tokens() (line 237 of D:\foo\sites\all\modules\workflow\workflow.module).

Haven't tried yet but the previous time I had all the workflow submodules activated just in case that were the cause of the problem. Also, I have node revisions activated now for the same reason.

I hope it helps. Regards and thanks again.

Anonymous’s picture

@NoRandom, sorry to hijack your thread. I was getting that error also. It was because my role did not have permission to transition the node to another state. So edit the workflow (/admin/config/workflow/workflow/edit/1) and make sure the permissions are correct for administrator.

NoRandom’s picture

Status: Active » Fixed

No problem, pferlito, whip yourself a couple of times and everything will be fine ;)

And thanks a lot, the solution was as simple as you said, inside /admin/config/workflow/workflow/edit/1. I didn't look inside this option because I thought the options would be the same I saw when I created the workflow, but no, There are the permissions for view/edit/transfer nodes in different states.

I think you should be redirected to this page when you create your first workflow or, almost, default options (creator can transfer nodes to the first state and admins can do everything) should be activated.

Regards.

Bastlynn’s picture

Status: Fixed » Closed (fixed)

There's another issue open on improving the UI for workflow (caused by an almost identical behavior report actually). It looks like both of you are set now, so I think UI suggestions should go on the other issue thread so we have all the requests in one place. See: http://drupal.org/node/1430980

xqbzzr’s picture

Ahm... I have the exact same problem. Although I checked all permissions there is no way to change any states. Even as admin i have no buttons to change any states. This happens on fresh install and cleared caches.
Additional the function for renaming the "workflow" tab does not work. No matter what I type as new tab-name, the tab itself still says "workflow".

Bastlynn’s picture

a) Did you create transitions for your workflow to define what state can go to what state?
b) Did you activate Workflow Actions/Triggers or Workflow Rules if you're in D7?

xqbzzr’s picture

a) Yes!
b) Yes!

I have very succesfully worked with workflows in D6 and have quite a bit of experience. I fiddled with all the obvious things, like flushing caches, trying other nodetypes etc. but I cannot get the thing to work. Neither as normal user nor as admin.

xqbzzr’s picture

StatusFileSize
new57.4 KB

Aaaahh! I got it!
I am working with a different language (german) and when I switch back to english, all is well and works perfectly! Is this just a matter of translation, or is it a problem within the module.
I thought that if strings are not translated, the basic english ones will be displayed. But in this case, there is nothing at all.
See attached screenshots.
If I make a first state-transition in english and then switch back to german, everything works well even in the german version.