Closed (fixed)
Project:
Rules
Version:
6.x-1.x-dev
Component:
Scheduler
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Oct 2010 at 19:22 UTC
Updated:
29 Dec 2010 at 13:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
lipinponmala007 commentedme too had the same error when iam on my rules scheduler page
warning: Missing argument 3 for rules_data_type_date::get_default_input_form(), called in /var/www/cart/modules/rules/rules_scheduler/rules_scheduler.admin.inc on line 54 and defined in /var/www/cart/modules/rules/rules/modules/rules.rules.inc on line 88.
Comment #2
Goofy2k commentedSame for me !
Comment #3
Goofy2k commentedsubscribe
Comment #4
mmilo commentedSubscribing and confirmed.
This is easy to reproduce:
- Add a new rule set with no arguments (you don't have to add any rules)
- Goto the scheduling page at
rules/rule_sets/schedulingComment #5
jayelless commentedThe function "get_default_input_form" on line 88 of rules.rules.inc defines the method in object "rules_data_type_date". It specifies three arguments:
$info (an array used to describe the form),
$value (the initial value of the date field),
$form_state (which is not used within the function).
The call to this function (method) from line 54 of "rules_scheduler.admin.inc" provides only the first two arguments.
The solution is to either modify the call in line 54 to provide a third argument (it is passed by reference, so a new variable needs to be created and supplied), or to change the function definition on line 88 to remove the unused argument of $form_state.
While either change should work, my preference would be to remove the redundant unused argument from the function definition. However, I note that other class definitions in the file "rules.rules.inc" also include redundant $form_state arguments that could usefully be removed as well.
There are only two calls to any of these functions (methods) from within the rules code. One of these calls supplies the $form_state argument, and the other does not.
Maybe the safest patch is to modify line 88 of "rules.rules.inc" file to specify a default for a missing argument ("&$form_state = NULL").
Comment #6
malks commentedThe patch in #5 is working fine for me.
Comment #7
klausiconfirmed.
Comment #8
klausi$form_state may be required by other modules that override the data type classes, so the invocation in rules_scheduler must be fixed. Patch attached.
Comment #10
klausi#8: 940820-rules-scheduler-warning.patch queued for re-testing.
Comment #12
klausi#8: 940820-rules-scheduler-warning.patch queued for re-testing.
Comment #14
eric_a commentedFails due to #996512: D6 contrib project tests: [MySQL] Drupal installation failed..
Comment #15
fagoThe patch looks good though. I've committed it, thanks.