I keep receiving the following error:

Warning: call_user_func(RulesDataUI::render) [function.call-user-func]: First argument is expected to be a valid callback in RulesPluginUI->buildContent() (line 716 of /sites/all/modules/rules/ui/ui.core.inc).

I am attempting to clone and modify the clone of this rule:

{ "rules_rules_send_hpcs_digest" : {
    "LABEL" : "Send HPCS Newsletter Email Digest",
    "PLUGIN" : "rule",
    "REQUIRES" : [
      "views_bulk_operations",
      "php",
      "rules",
      "rules_conditional",
      "simplenews_rules",
      "rules_scheduler"
    ],
    "IF" : [
      { "views_bulk_operations_condition_result_count" : { "view" : "documents_from_the_past_day|default", "minimum" : "1" } }
    ],
    "DO" : [
      { "views_bulk_operations_action_load_list" : {
          "USING" : { "view" : "documents_from_the_past_day|default" },
          "PROVIDE" : { "entity_list" : { "documents" : "Documents" } }
        }
      },
      { "variable_add" : {
          "USING" : {
            "type" : "text",
            "value" : "\u003Cp\u003EGreetings;\u003C\u002Fp\u003E\u003Cp\u003EHere is a list of HPCS newsletters that were published today, \u003C?php echo date(\u0022l, F j, Y\u0022); ?\u003E:\u003C\u002Fp\u003E\u003Cul\u003E"
          },
          "PROVIDE" : { "variable_added" : { "generated_body" : "Generated Body" } }
        }
      },
      { "LOOP" : {
          "USING" : { "list" : [ "documents" ] },
          "ITEM" : { "current_document" : "Current Document" },
          "DO" : [
            { "CONDITIONAL" : [
                {
                  "IF" : { "data_is" : {
                      "data" : [ "current-document:field-document-type:tid" ],
                      "value" : "30"
                    }
                  },
                  "DO" : [
                    { "data_set" : {
                        "data" : [ "generated-body" ],
                        "value" : "[generated-body:value]\u003Cli\u003E\u003Ca href=\u0022[current-document:url]\u0022\u003E[current-document:title]\u003C\u002Fa\u003E\u003C\u002Fli\u003E"
                      }
                    }
                  ]
                }
              ]
            }
          ]
        }
      },
      { "data_set" : {
          "data" : [ "generated-body" ],
          "value" : "[generated-body:value]\u003C\u002Ful\u003E\u003Cp\u003EIf at any time you wish to cancel your subscription to this service you can do so using the unsubscribe link below.\u003Cbr \u002F\u003EThank you for using the HPCS Newsletter Email Service!\u003C\u002Fp\u003E\u003Cp\u003E--  [site:name] website team\u003C\u002Fp\u003E"
        }
      },
      { "entity_create" : {
          "USING" : {
            "type" : "node",
            "param_type" : "simplenews",
            "param_title" : "HPCS Newsletter Notification for \u003C?php echo date(\u0022l, F j, Y\u0022); ?\u003E",
            "param_author" : [ "site:current-user" ]
          },
          "PROVIDE" : { "entity_created" : { "created_newsletter" : "Created Newsletter" } }
        }
      },
      { "data_set" : {
          "data" : [ "created-newsletter:field-simplenews-term" ],
          "value" : "44"
        }
      },
      { "data_set" : {
          "data" : [ "created-newsletter:body:value" ],
          "value" : [ "generated-body" ]
        }
      },
      { "data_set" : { "data" : [ "created-newsletter:body:format" ], "value" : "html" } },
      { "entity_save" : { "data" : [ "created-newsletter" ], "immediate" : 1 } },
      { "simplenews_rules_action_send" : { "node" : [ "created-newsletter" ] } },
      { "schedule" : {
          "component" : "rules_rules_send_hpcs_digest",
          "date" : "midnight +1 day",
          "identifier" : "HPCS Newsletter Email Service"
        }
      }
    ]
  }
}

One thing that happens is somehow the site is stuck referring to a copy of the original before it was modified/its name was modified when I try to modify the first term reference field. I have cleared the site's cache, the rules cache, and disabled caching, and changed web browsers and the problem still persists.

Comments

rbrownell’s picture

Category: bug » support

More Errors... Also Downgraded this to a support request... I think a Bug Report was a bit much...

Warning: call_user_func(RulesDataUI::render) [function.call-user-func]: First argument is expected to be a valid callback in RulesPluginUI->buildContent() (line 716 of /sites/all/modules/rules/ui/ui.core.inc).
RulesEvaluationException: The given container is incompatible with this element. in RulesConditionalElement->setParent() (line 214 of /sites/all/modules/rules_conditional/includes/rules_conditional.core.inc)
rbrownell’s picture

Status: Active » Fixed

I ended up exporting the rule and re-creating it... It turned out that I was missing an entity is of type conditional in the actions (that I removed trying to make the rule more efficient thinking that a VBO filter will select the entity type for me (it doesn't)).

rbrownell’s picture

Category: support » bug
Status: Fixed » Active

Upon further review, there seems to be some sort of bug in here... Cloning this rule (after fixing what was mentioned in the previous comment) and then attempting to modify the clone resulted in the clone becoming entangled with the parent. I would attempt to edit an action of the clone and it would return me to the parent rule instead of the clone I was editing. This happened for some but not all fields, particularly the current-document:field-document-type:tid field and a couple of others. The only way that I was able to get this to work was to export the rule and import it and modify the value by hand before the import. Not sure if this is a Rules or Conditional Rules issue.

fishandfly@gmail.com’s picture

same issue!

fago’s picture

Version: 7.x-2.3 » 7.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

Please try to reproduce the problem using the latest dev version, provide the steps to reproduce and describe the problem such that it is easy to understand for others (including a descriptive issue title). Thanks!

TR’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

No further information provided ...