New content types not being seen by rules.
| Project: | Rules |
| Version: | 6.x-1.1 |
| Component: | Rules Engine |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
This one is odd. I have working rules that check if a field has been updated. They work fine. On any new content types I create, rules always returns FALSE for "field has been updated". Even odder, If I negate the rule, it still returns FALSE. I can use a field from an older content type and the rule works fine, but if I use a field from a content type created within the last week it fails.
I am racking my brain trying to figure out if some setting has been changed but aside from perms I can't figure out what would do this. Besides, I am running as user #1, perms should not matter.
I would LOVE to solve this problem, I am just not sure how to begin. I just created a new content type and the rule, "After existing content has been updated" Condition "Field has changed" I have triple checked that I have the correct field. arguments are : Content containing changes (updated content) content not containing changes (unchanged content) When I edit the content type, then save, I get this.
*
o 0 ms "After updating existing content" has been invoked.
o 0.118 ms Executing the rule "testing field change detect rule." on rule set "After updating existing content"
o 0.4 ms Loaded variable "unchanged content"
o 0.514 ms Condition "Updated content's field 'field_test_content_test' has been changed" evaluated to FALSE.
o 0.588 ms Evaluation of "After updating existing content" has been finished.
* Test Content type Test item has been updated.
field_test_content_test WAS changed.
If I go back to the rule and NEGATE it.. I get the same thing..
*
o 0 ms "After updating existing content" has been invoked.
o 0.117 ms Executing the rule "testing field change detect rule." on rule set "After updating existing content"
o 0.398 ms Loaded variable "unchanged content"
o 0.509 ms Condition "Updated content's field 'field_test_content_test' has been changed" evaluated to FALSE.
o 0.583 ms Evaluation of "After updating existing content" has been finished.
* Test Content type Test item has been updated.
Now.. If I use a field from an old content type.. This is what I get..
*
o 0 ms "After updating existing content" has been invoked.
o 0.141 ms Executing the rule "testing field change detect rule." on rule set "After updating existing content"
o 0.485 ms Loaded variable "unchanged content"
o 0.622 ms Condition "Updated content's field 'field_nurse_first_name' has been changed" evaluated to TRUE.
o 0.712 ms Evaluation of "After updating existing content" has been finished.
* Nursing Profile Mclifter, Jim, RN has been updated.
It works perfectly. So, new content fields are not working, old ones are.

#1
More data.
if I change the condition to "content is going to be saved" it works.
#
* 0 ms "Content is going to be saved" has been invoked.
* 0.12 ms Executing the rule "test field rule" on rule set "Content is going to be saved"
* 0.375 ms Loaded variable "unchanged content"
* 0.485 ms Condition "Saved content's field 'field_test_content_test' has been changed" evaluated to TRUE.
* 0.562 ms Evaluation of "Content is going to be saved" has been finished.
If I activate the "content has been updated and both rules execute this follows..
# 0.445 ms Executing the rule "content has been updated test" on rule set "After updating existing content"
# 0.771 ms Loaded variable "unchanged content"
# 0.935 ms Condition "Updated content's field 'field_test_content_test' has been changed" evaluated to FALSE.
# 1.013 ms Evaluation of "After updating existing content" has been finished.