I have a config that populates a CCK field, event = Content is going to be saved.
If I do this action via rule set the node is saved again. Also the revision looks nasty (snap.png) - the current revision below the new one.

CommentFileSizeAuthor
snap.png28.83 KBamitaibu

Comments

fago’s picture

Component: Rules Core » Rules Engine

Indeed that's because rules treats the execution of a rule set as a separate thing. It should be improved to work on top of the same state as the triggered rule. However I don't think this is easy to fix so perhaps it has to wait until 2.x..

mitchell’s picture

Status: Active » Postponed
amitaibu’s picture

I think this bug isn't minor, because if you have node revisions and try to use the Rule sets, you are bound to have duplicate revisions. nasty.

The problem as I understand it is that we save the variables on every rules_invoke_rule_set() - and that function doesn't know if it's nested in another rule. I'd like to work on it, and I wonder what you think is the best approach - hold an array of the currently executed rules maybe and check it reached back to the parent before saving?

fago’s picture

Status: Postponed » Active

I set it back to active, as this is an important think, which we shouldn't forget about!

fago’s picture

fago’s picture

Issue tags: +rules 1.0

I'll have a look if I can fix it before doing the 1.0 release.

fago’s picture

ok, I've implemented it. Please test.

fago’s picture

Status: Active » Fixed
RoboPhred’s picture

Confirmed fixed in -dev April 21, thanks!

Status: Fixed » Closed (fixed)
Issue tags: -rules 1.0

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