Needs work
Project:
Rules
Version:
7.x-2.0-beta2
Component:
Rules Engine
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2011 at 21:31 UTC
Updated:
7 Nov 2011 at 23:28 UTC
Jump to comment: Most recent file
Comments
Comment #1
fagoOh, yes. The loop should care about saving all unsaved variables that go out of scope.
As interim workaround you can use the entity-save action to manually trigger the saving.
Comment #2
twistor commentedThis is probably all sorts of wrong, but it's working for me at the moment.
Comment #3
fagoWhy are you removing the list-item? If it's changed it should be saved too.
We should make use of $state->cleanup() as this properly saves derived entities (by drilling down in the data selector) too.
For that to work we need to reset $state->save when cloning the state - that makes sense to me as that way cloned states can be safely used when a scope should not influence a parent scope and finish with cleanup.
Comment #4
videographics commentedUntil this is fixed, we should document clearly that creating an entity within a loop requires the "Save entity" element with the "Force saving immediately" setting checked. (There. Maybe I just did it.) :-)