While adding a condition to check "Content has workflow state" I get the following error

Notice: Trying to get property of non-object in _workflow_rules_workflow_get_options() (line 39 of /workflow/workflow_rules/workflow_rules.rules-callback.inc).

I also tried to upgrade Rules module to latest stable release, but the error still exists. I guess the problem is with the Workflow module (7.x.2.4).

Attached screenshot.

Thanks in advance.

CommentFileSizeAuthor
Capture.PNG42.78 KBbharathkumarkn

Comments

bdeusanio’s picture

Same problem :
I'm checking the state transition of a node to create a new revision.
On this rule, which use workflow_rules, I've got this error in line 39.

My configuration is :
rules : version 7.x-2.7
workflow : version 7.x-2.4

Workflow_rules (workflow submodule) is also activated

klasmeytmo’s picture

You just have to add an '@' sign before it. Its working though even for that message

johnv’s picture

Are you using Workflow Node or Workflow Field?
For Workflow Node this is indeed an error. For Workflow Field, you should use :
- condition Entity is of or Entity has Field
- condition Data Comparison.

bdeusanio’s picture

I'm using workflow Node module.
Workflow field is not activated.

@ is not a solution, this is only a "subterfuge" to undisplay the message error.

bdeusanio’s picture

This is my configuration :
Events : the workflow state has changed
Conditions : Content has a workflow state
Data selector value of my condition element is set to node

when the condition is done, this error message is displayed
Notice : Trying to get property of non-object dans _workflow_rules_workflow_get_options() (ligne 39 dans /var/apps/drupal/sites/all/modules/workflow/workflow_rules/workflow_rules.rules-callback.inc).

I'm not using workflow field, but I'm thinking about when I saw it...

Have a nice day and tell me if you need more details to replicate the bug

bdeusanio’s picture

I have delete the event and recreate it.
The error has gone.... I think it can be closed.

  • johnv committed c8905f4 on 7.x-2.x
    Issue #2312243: Fixed Notice: Trying to get property of non-object in...
johnv’s picture

Title: Error while adding condition "Content has Workflow state" in rules » Notice: Trying to get property of non-object in _workflow_rules_workflow_get_options() while adding condition "Content has Workflow state" in rules
Issue summary: View changes
Priority: Major » Normal
Status: Active » Fixed

Adjacent commit should fix the problem. Please try latest dev- release.

Status: Fixed » Closed (fixed)

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

davidcz’s picture

The fix from #7 did not make it into 7.x-2.4

johnv’s picture

Correct. The pro lem is in 2.4, and fixed in the next version, until then in dev version.