Hello,
I have a rule based on "content is going to be viewed" and another one on "after saving new content".
The common condition is "content has type" and should be TRUE for some content type I've created. But it doesn't work.
The debug information says :
-------------------------
# 0 ms Content is going to be viewed has been invoked.
# 12.559 ms Executing the rule test on rule set Content is going to be viewed
# 12.812 ms Condition viewed content is TEST evaluated to FALSE.
-------------------------
It's really surprising because it works correctly on my local installation. Moreover, if content type is native ("page", "article"), it works well.
I tried to create again another content type, another rule, but problem is always here. I tried also to import an old backup of my website...
Thank you in advance for any solution...
Patrice
Comments
Comment #1
kpander commentedI'm getting the same problem. I tried to look into the code to see if I could spot a problem and I *think* it's related to the fact that in Drupal 6.x, node_load() doesn't return a node object with the 'type' field (therefore, the type comparison doesn't work).
i.e., When I look at the function rules_condition_content_is_type() and output the value of $node, there's no $node->type;
Perhaps the answer lies somewhere there?
Kendall
Comment #2
fagoprobably you are running php4 on this site?
-> see #313371: On PHP 4.x evaluation of content type is always FALSE.
>i.e., When I look at the function rules_condition_content_is_type() and output the value of $node, there's no $node->type;
thanks, so we are one step further! ;)
Comment #3
Seighaus commentedSubscribe