Closed (fixed)
Project:
Domain Rules
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
17 Jul 2013 at 05:19 UTC
Updated:
18 Jul 2013 at 06:26 UTC
I am trying to use Rules to set the domain theme based on a taxonomy condition of a domain node. I am getting this error:
Recoverable fatal error: Argument 2 passed to db_query() must be an array, string given, called in /domain_rules/domain_rules.module on line 223 and defined in db_query() (line 2342 of /includes/database/database.inc).
Comments
Comment #1
shushu commented@bmx269, can you please export the rule and show it to me ?
Thanks,
Shushu
Comment #2
bmx269 commentedComment #3
bmx269 commentedThe full rule with Conditional Rules (https://drupal.org/project/rules_conditional) is
The themes chosen are for testing.
Comment #4
shushu commentedThanks.
db_query changed from D6 to D7, and while it worked as is, it seems to stop working (or at least to give angry error messages).
Please try the attached version(can't attach .module files) just to verify it works before I create a new version.Please edit your domain_rules.module and replace the domain_rules_action_set_domain_theme() function with this code:
(I know I should have just put a patch file, but I know some people have hard time patching...)
Regards,
Shushu
Comment #5
bmx269 commentedWith the change as per above, this is the error I am now getting. This and the original error do not allow the rule to change the domain theme. They work fine without the theme part.
PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens: UPDATE {domain_theme} SET status = 1 WHERE domain_id = :domain_id AND theme = ':theme'; Array ( [:domain_id] => 2 [:theme] => hot_rod ) in domain_rules_action_set_domain_theme() (line 229 of /home/servicebay/public_html/sites/all/modules/contrib/domain_rules/domain_rules.module).Comment #6
shushu commentedTrying again...
Comment #7
bmx269 commentedWe have success. That worked perfectly. Thanks so much. I think it needs to be committed to the release.
Comment #8
shushu commented