Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
my rules export:
{ "rules_create_institution_for_medics" : {
"LABEL" : "Create institution for medics",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules", "profile2" ],
"ON" : [ "profile2_presave" ],
"IF" : [
{ "NOT data_is_empty" : { "data" : [ "profile2:user:profile-medic:field-add-institution-title" ] } },
{ "data_is_empty" : { "data" : [ "profile2:user:profile-medic:field-doctor-workplace" ] } }
],
"DO" : [
{ "entity_create" : {
"USING" : {
"type" : "node",
"param_type" : "institution",
"param_title" : [ "profile2:user:profile-medic:field-add-institution-title" ],
"param_author" : [ "site:current-user" ]
},
"PROVIDE" : { "entity_created" : { "entity_created" : "Created entity" } }
}
},
{ "data_set" : { "data" : [ "entity-created:language" ], "value" : "ru" } },
{ "data_set" : {
"data" : [ "entity-created:field-institution-type" ],
"value" : [ "profile2:user:profile-medic:field-add-institution-type" ]
}
},
{ "entity_save" : { "data" : [ "entity-created" ] } },
{ "redirect" : { "url" : [ "entity-created:edit-url" ] } }
]
}
}
that is wrong?
thank u
Comments
Comment #1
DenisVSI'm have same issue too.
Notice: Undefined property: stdClass::$nid in eval() (line 3 of /path/www/sites/all/modules/rules/modules/php.eval.inc(146) : eval()'d code).
My code:
Comment #2
pebosi CreditAttribution: pebosi commentedTry setting the "immediate" checkbox on "entity_save" action, this works for me.
Comment #3
ruthverena75 CreditAttribution: ruthverena75 commentedi have the same problem, i searched for the checkbox and could not find it.
where do i find the setting/checkbox "immediate"?
thx in advance
Comment #4
TR CreditAttribution: TR commented