To avoid any troubles with invoking entity_save() on hook_entity_insert() we have to make sure Rules operates last - else modules' update hooks might be invoked before their insert hooks.

For that Rules has already a rather high weight, however if modules implement the generic entity hooks they are currently still operating after Rules - as they come after the entity-type specific hooks. To fix, we need to use the generic entity hooks too for invoking rules events.

Entity type providing modules should just invoke the rules-event last. For the entity API we can fix that generally.

Files: 
CommentFileSizeAuthor
#3 rules_entity_events.patch5.98 KBfago
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch rules_entity_events_2.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]
#2 rules_entity_events.patch5.98 KBfago
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch rules_entity_events_1.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]
#1 rules_entity_events.patch5.82 KBfago
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch rules_entity_events.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]
#1 entity_rules_events.patch1.05 KBfago
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch entity_rules_events.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]

Comments

Component:Rules Core» Rules Engine
Status:Active» Needs review
StatusFileSize
new1.05 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch entity_rules_events.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]
new5.82 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch rules_entity_events_0.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]
new5.82 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch rules_entity_events.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]

Attached are patch for Rules + the Entity API.

StatusFileSize
new5.98 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch rules_entity_events_1.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]

added a comment explaining why do it that way + including a pointer to this issue. Updated rules patch attached.

StatusFileSize
new5.98 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch rules_entity_events_2.patch. This may be a -p0 (old style) patch, which is no longer supported by the testbots.
[ View ]

some more docu fixes spotted by klausi in real-time.

Status:Needs review» Reviewed & tested by the community

Ack

Status:Reviewed & tested by the community» Fixed

and committed, thx. :)

Status:Fixed» Closed (fixed)

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

Component:Rules Engine» Rules Core

I seem to have the same problem with webforms which does not seem to be an entity (inserting,not updating).
Is there another workaround I could develop / try?
For more information, please have a look at
this ticket