I'm not sure is it a bug with BOTCHA, or the Rules module, but since I haven't found anyone complaining about this issue on the Rules project, I suspect it might be a BOTCHA's issue. So, I created a rule:

{ "rules_block_ip_by_botcha" : {
    "LABEL" : "Block IP by BOTCHA",
    "PLUGIN" : "reaction rule",
    "TAGS" : [ "BOTCHA" ],
    "REQUIRES" : [ "rules", "php", "botcha" ],
    "ON" : [ "botcha_form_rejected" ],
    "IF" : [
      { "user_has_role" : {
          "account" : [ "site:current-user" ],
          "roles" : { "value" : { "1" : "1" } }
        }
      }
    ],
    "DO" : [ { "php_eval" : { "code" : "system_block_ip_action();" } } ]
  }
}

And in my logs there are many entries like this one:
RulesEvaluationException: Argument <em class="placeholder">total_recipes</em> is missing. in RulesPlugin->setUpState() (line 652 of /home/user/public_html/sites/all/modules/rules/includes/rules.core.inc).

Duplicate of: #1932406: RulesEvaluationException: Argument total_recipes is missing (BOTCHA)

Comments

iva2k’s picture

Status: Active » Fixed

In rules D7 there is a change in the API, rules_invoke_event_by_args() takes associative array and rules_invoke_event() takes positional arguments.

All 7.x- branches updated.

PLease verify that it fixes your issue and report back here.

Status: Fixed » Closed (fixed)

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

lilou’s picture

Status: Closed (fixed) » Active

I have the same bug, but with the patched version, I got this message :

EntityMetadataWrapperException : Invalid data value given. Be sure it matches the required data type and format. dans EntityMetadataWrapper->set() (ligne 122 dans /home/xxxx/drupal/7.x/html/sites/all/modules/entity/includes/entity.wrapper.inc).

lilou’s picture

Version: 7.x-3.2 » 7.x-3.x-dev
garymullins’s picture

I am experiencing the same issue.
I have tried both 7.x-3.2 and 7.x-3.x-dev with Drupal core 7.22
i'm tempted to try 7.x-4.x-dev.tar.gz but the release date is after the 7.x-3.x-dev release date and the date the bug was reported fixed (4/7).

I also think that the priority should be higher as it prevents user registration when both Rules and Botcha are active.

xbrianx’s picture

Issue summary: View changes

I tried to do this exact same thing, but rules are not even firing on the botcha rejection as per my logs.