Closed (fixed)
Project:
Rules
Version:
7.x-2.3
Component:
Rules Core
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 May 2013 at 19:20 UTC
Updated:
13 Aug 2018 at 00:39 UTC
Jump to comment: Most recent
Comments
Comment #1
ptmkenny commentedComment #2
tr commentedEntity rules are triggered by entity hooks, which means that the hook has to be invoked for the Rule to be triggered.
The hooks are triggered when you manipulate Entities via the Entity API.
Bypassing the hooks by doing direct SQL calls to create entities is A Very Bad Idea because it circumvents all of the Drupal API and does not let any other module contribute to the process. Besides, it's actually a lot easier to use the API to create your entities than it is to do it directly with SQL. And if you ever add a field to your Entity, for instance, the API call will continue to work and properly create your entities, while your SQL will have to be rewritten to account for the new field. So, use the API and everything will work as it should.