I want to create a specific advanced action to move the post to State X. In creating an advanced action, I get the following errors. I have uninstalled and reinstalled the Workflow VBO module, and cleared caches.

I am using workflow with Entityforms (through workflow fields) and not with a normal content type - I am not sure if that affects anything.

Notice: Undefined index: entity_type in workflow_vbo_given_state_action_form() (line 70 of ../sites/all/modules/workflow/workflow_vbo/actions/given.action.inc).
Notice: Undefined index: entity keys in workflow_vbo_given_state_action_form() (line 71 of ../sites/all/modules/workflow/workflow_vbo/actions/given.action.inc).
Notice: Undefined index: entity_type in workflow_vbo_given_state_action_form() (line 72 of ../sites/all/modules/workflow/workflow_vbo/actions/given.action.inc).
Notice: Undefined index: view in workflow_vbo_given_state_action_form() (line 73 of ../sites/all/modules/workflow/workflow_vbo/actions/given.action.inc).
Notice: Trying to get property of non-object in workflow_vbo_given_state_action_form() (line 73 of ../sites/all/modules/workflow/workflow_vbo/actions/given.action.inc).
Warning: Invalid argument supplied for foreach() in workflow_vbo_given_state_action_form() (line 79 of ../sites/all/modules/workflow/workflow_vbo/actions/given.action.inc).
Notice: Undefined index: entity keys in entity_id() (line 580 of ../sites/all/modules/entity/entity.module).
Notice: Undefined index: entity keys in entity_id() (line 580 of ../sites/all/modules/entity/entity.module).
Notice: Undefined index: entity keys in entity_extract_ids() (line 7728 of ../includes/common.inc).
Notice: Undefined index: entity keys in entity_extract_ids() (line 7729 of ../includes/common.inc).
Notice: Undefined variable: wid in _workflow_get_workflow_creation_sid() (line 997 of ../sites/all/modules/workflow/workflow.module).
Workflow cannot be loaded. Contact your system administrator.
Notice: Undefined index: entity keys in entity_id() (line 580 of ../sites/all/modules/entity/entity.module).
Error: content has no workflow attached. The data is not saved.
Notice: Undefined index: entity_type in workflow_vbo_given_state_action_form() (line 70 of ../sites/all/modules/workflow/workflow_vbo/actions/given.action.inc).
Notice: Undefined index: entity keys in workflow_vbo_given_state_action_form() (line 71 of ../sites/all/modules/workflow/workflow_vbo/actions/given.action.inc).
Notice: Undefined index: entity_type in workflow_vbo_given_state_action_form() (line 72 of ../sites/all/modules/workflow/workflow_vbo/actions/given.action.inc).
Notice: Undefined index: view in workflow_vbo_given_state_action_form() (line 73 of ../sites/all/modules/workflow/workflow_vbo/actions/given.action.inc).
Notice: Trying to get property of non-object in workflow_vbo_given_state_action_form() (line 73 of ../sites/all/modules/workflow/workflow_vbo/actions/given.action.inc).
Warning: Invalid argument supplied for foreach() in workflow_vbo_given_state_action_form() (line 79 of ../sites/all/modules/workflow/workflow_vbo/actions/given.action.inc).
Notice: Undefined index: entity keys in entity_id() (line 580 of ../sites/all/modules/entity/entity.module).

Comments

april26’s picture

I redid this process on a new installation of Drupal 7, and there is still a problem. I tried with the old Node Workflow, as well as Fields workflow and both cause the error. "Error: content has no workflow attached. The data is not saved."

I think the problem happened when Actions were moved to Workflow VBO.

danepowell’s picture

Yep, I am also having this issue.

johnv’s picture

Status: Active » Postponed (maintainer needs more info)

Please give a step-by-step script. It's unclear how to reproduce this.

tchopshop’s picture

Version: 7.x-2.3 » 7.x-2.4
Component: Views VBO » Rules

I'm also having this problem using Workflow Fields, Entityforms and Rules. When an anonymous user submits an entity form which references a node, I want to change the workflow state of the referenced node. The rule correctly sends an email, and the rules conditions pass that check that the node is indeed referenced and that it has the workflow field but when it moves on to the action part of the rule it outputs this message:

Workflow cannot be loaded. Contact your system administrator.
Wrong call to constructor Workflow*Transition(0 to 9)
You tried to set a Workflow State, but the entity is not relevant. Please contact your system administrator.

My guess is that it must be related to permissions because the user who initiated the rule is anonymous, but I could be wrong. I'm not a programmer. I'm not using Workflow Access.

I was successful at getting this same rule to work before using Workflow node. But I had to change over to Workflow Fields and this has stopped working.

thanks!

EDIT: I discovered that my rules WILL work with the generic rule "Set a data value" on the workflow field. I was using the "Set a Workflow Field State" which does not work in any of my rules.

johnv’s picture

Status: Postponed (maintainer needs more info) » Active

Some more details from Sergey119 in #2312529: ERROR in creating an advanced action

If you use Workflow 7.x-2.4 in Drupal 7.30, you can go to admin/config/system/actions and find the CREATE AN ADVANCED ACTION select list at the bottom of the page. Unfold it, please, and try to select "Change workflow state of post to new state...". You will get nothing! Instead of creating the chosen operation that is NECESSARY for your work, the programm will stop working and show you an empty page. And then you will see the following long list of errors (like in OP):

johnv’s picture

  • johnv committed ded0df8 on 7.x-2.x
    Issue #2274999: Fixing errors when creating an advanced action.
    
johnv’s picture

The errors are gone, but the actions still do not work. That will be fixed in #2295625: With VBO, workflow submissions are not moved to next state

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.