I followed the tutorial at http://drupal.org/node/517674 and I am getting this error, but only on the scheduling page. I did create content and mark it for unpublished and it does show up on the scheduler task list so it seems like it is working. I just don't know what that php error is. Any help would be greatly appreciated! :) great tutorial by the way

warning: Missing argument 3 for rules_data_type_date::get_default_input_form(), called in /home/jrivelli12/dev/sites/all/modules/rules/rules_scheduler/rules_scheduler.admin.inc on line 54 and defined in /home/jrivelli12/dev/sites/all/modules/rules/rules/modules/rules.rules.inc on line 88.
CommentFileSizeAuthor
#8 940820-rules-scheduler-warning.patch1.13 KBklausi

Comments

lipinponmala007’s picture

me 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.

Goofy2k’s picture

Same for me !

Goofy2k’s picture

subscribe

mmilo’s picture

Subscribing 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/scheduling

jayelless’s picture

The 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").

malks’s picture

The patch in #5 is working fine for me.

klausi’s picture

Version: 6.x-1.3 » 6.x-1.x-dev
Category: support » bug

confirmed.

klausi’s picture

Status: Active » Needs review
StatusFileSize
new1.13 KB

$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.

Status: Needs review » Needs work

The last submitted patch, 940820-rules-scheduler-warning.patch, failed testing.

klausi’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 940820-rules-scheduler-warning.patch, failed testing.

klausi’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 940820-rules-scheduler-warning.patch, failed testing.

eric_a’s picture

fago’s picture

Status: Needs work » Fixed

The patch looks good though. I've committed it, thanks.

Status: Fixed » Closed (fixed)

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