warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /home/net2comm/domains/dev6/promis/includes/database.mysqli.inc on line 323.
user warning: Duplicate entry 'views_bulk_operations_ruleset_action' for key 1 query: INSERT INTO actions (aid, type, callback, parameters, description) VALUES ('views_bulk_operations_ruleset_action', '', '', '', '') in /home/net2comm/domains/dev6/promis/includes/actions.inc on line 276.
warning: preg_match() expects parameter 2 to be string, array given in /home/net2comm/domains/dev6/promis/includes/bootstrap.inc on line 771.
Comments
Comment #1
bsnodgrass commentedOther info:
Drupal. 6.10, Views 6.x-2.3
Comment #2
infojunkieThanks for your report. I'll be investigating this. In the meantime you can just rename the rules.action.inc file to rules.action.bug or delete it altogether if you want to proceed with using VBO.
Comment #3
bsnodgrass commentedthanks!
Comment #4
infojunkieTo help me debug this, can you please also tell me what version of Rules you are using? And what's the list of Rulesets that you've created? Thanks.
Comment #5
bsnodgrass commentedUsing rules 6.x-1.0-beta5
We have note yet established any rulesets
Comment #6
infojunkieNot sure what caused this error to be honest. However, your issue did point to a problem with rulesets that I fixed in the latest dev release. Please try it when you get the chance and let me know if the problem persists.
Comment #7
bsnodgrass commentedSorry for the delay in testing the new dev version out.. Drupalcon has me occupied!
this is from the Mar-05 dev version. Received the following errors when turning on the VBO module.
* warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /home/net2comm/domains/dev6/promis/includes/database.mysqli.inc on line 323.
* user warning: Duplicate entry 'views_bulk_operations_ruleset_action_rules_set_1' for key 1 query: INSERT INTO actions (aid, type, callback, parameters, description) VALUES ('views_bulk_operations_ruleset_action_rules_set_1', '', '', '', '') in /home/net2comm/domains/dev6/promis/includes/actions.inc on line 276.
* warning: preg_match() expects parameter 2 to be string, array given in /home/net2comm/domains/dev6/promis/includes/bootstrap.inc on line 771.
Comment #8
infojunkieThanks bsnodgrass, and enjoy Drupalcon! I'm still looking into this.
Comment #9
DanielJohnston commentedSubscribing. Installing Rules on top of VBO and various other modules introduces these errors for me too.
Comment #10
infojunkieCan you please explain the sequence of events that lead to those errors? Do they appear when you turn on Rules while VBO is already enabled, or vice-versa? Or when you actually invoke a view?
Comment #11
CathyN commentedI am a new be and just want to get rid of the 100's of duplicate events that appeared all at once posted by an anomynous person that was not me. Where do I go to start to figure it out? I've done 'get started'
Comment #12
DanielJohnston commentedAppear when turning on Rules while VBO is enabled. Can't guarantee that VBO is the cause of this issue, but this is the only bug report in the whole of d.o that matches. Further related errors appear when trying to use various parts of Rules, e.g.
/admin/rules/rule_sets gives
warning: preg_match() expects parameter 2 to be string, array given in /srv/danieljohnston.co.uk/public/htdocs/includes/bootstrap.inc on line 771./admin/rules/rules/rules_2/add/action/2?destination=admin%2Frules%2Frules%2Frules_2 gives
For reference, I have the following modules installed on a D6 site latest version:
admin_menu better_formats filefield imagecache logintoboggan notifications role_delegation token views
advanced_help cck flatcomments imagefield messaging og rules transliteration views_bulk_operations
author_pane content_profile globalredirect lightbox2 mollom og_promote simplenews ubercart webform
backup_migrate date imageapi link node_import pathauto simplenews_register user_import
Hope that helps!
Comment #13
squarecandy commentedHi all - having the same issue w/ VBO 6.x-1.5 - no errors with either rules or VBO modules turned on. But with both I get this:
* warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /var/www/berkshirefilm.com/html/new/includes/database.mysql.inc on line 321.
* user warning: Duplicate entry 'views_bulk_operations_ruleset_action' for key 1 query: INSERT INTO actions (aid, type, callback, parameters, description) VALUES ('views_bulk_operations_ruleset_action', '', '', '', '') in /var/www/berkshirefilm.com/html/new/includes/actions.inc on line 274.
* warning: preg_match() expects parameter 2 to be string, array given in /var/www/berkshirefilm.com/html/new/includes/bootstrap.inc on line 761.
I don't know much about what's under the hood yet, but I'm eager to learn and help with this issue if I can.
- P
Comment #14
infojunkieThanks for your reports. I haven't been able to reproduce this on my development installation so I'll try on a plain vanilla Drupal. Will keep you posted.
Comment #15
bsnodgrass commentedIn my case I had rules already enabled and got the error when I turned on VBO
Comment #16
bsnodgrass commentedCathyN - you may have this posted in the wrong place depending on what those errors are. Somewhere in errors there should be clues for you, perhaps they are the same as the ones posted on this issue. I'm not sure what the state of your site is (testing dev or live) but if you are live you probably want to go to admin/site configuration/error reporting and turn off reporting to screen.
Comment #17
infojunkieStill unable to repro this bug...
For those who don't care about calling rule sets from VBO, you can just rename rules.action.inc to rules.action.bug
To help me with debugging, can someone who has that problem please add this to rules.action.inc after line 14 and let me know if it makes a difference:
Thanks in advance!
Comment #18
j0rd commentedadding "'rules_ignore' => true," removes the SQL error for me.
Comment #19
infojunkieThanks j0rd! I've committed that fix to the latest dev update. Other reporters, please confirm.
Comment #20
bsnodgrass commentedremoved the error for me!
Thanks... Just in time as I think VBO will do great things !! Looking forward to using it.
Comment #21
DanielJohnston commentedOK, just updated to dev version. Going through the rule creation process, I reach the point of adding actions to a rule and get:
Is this likely to be the same issue, or have I found something entirely different?
Comment #22
infojunkie@DanielJohnston: you don't get these when VBO is not active?
Comment #23
DanielJohnston commentedOops. I still get these with inactive VBO. Looks like I'm hitting something entirely different. Immediate thought is that it might be left-over actions from deinstall of Organic Groups. Ignore my previous reports.
Comment #24
infojunkieComment #26
simonmd commentedI'm still getting the original "Duplicate entry 'views_bulk_operations_ruleset_action_rules_set_1' for key 1" issue using the latest 6.x-1.x-dev ...
I am also getting the "preg_match() expects parameter 2 to be string, array given in..."
Are these two warnings somehow related? I see that DanielJohnston had this issue as well, but it didn't seem to be VBO.
Any insights?
Comment #27
infojunkie@simonmd: can you confirm that the fix in comment #17 is there in the module code?
If it is, please make sure that you don't have multiple instances of VBO in your modules folder. I've seen that happen many times and it's a major source of confusion.
Comment #28
simonmd commentedIndeed it is, line 15 of rules.action.inc reads:
'rules_ignore' => true,
There is also just one instance of views_bulk_operations in my modules folder.
Deactivating the 'Rules' module (not surprisingly) gets rid of these errors, but I really need it.. :(
Comment #29
infojunkieAs a workaround, you can rename the file rules.action.inc in VBO to rules.action.bug. In the meantime, I'll look at this again to see what else can be wrong.
Comment #30
simonmd commentedThis would disable triggering of rules with VBO, I assume?
Comment #31
infojunkieMore specifically, this would disable the ability to invoke rulesets via the VBO interface.
Comment #32
simonmd commentedRule Sets, but not individual triggered rules? That could work for me..
Comment #33
fagoI had a short look at the rules.action.inc file - I think the problem is that your function name accidentally implements hook_rules_action_info(), but doesn't return stuff in the format rules is expecting. So renaming the function should fix this problem.
Anyway, I'd suggest keeping rules ignore activated - as rules has (rules) actions to invoke a rule set on its own, so rules users won't need another one ;)
Comment #34
infojunkieThanks fago for your suggestion! I renamed the file and the function, so please everyone try out the latest dev release (12 hours from now).
Comment #35
infojunkieFixed unless I hear back from the original posters.