I have created a relatively simply CCK event type, with a single date field. The date field is not required (it was, I turned it off to see if it solved the problem, it didn't...). When I create an event that does not utilize the date repeat options, I get the following errors:

<ul>
  <li>warning: Missing argument 3 for form_set_value(), called in /home/.../sites/all/modules/date/date/date_repeat.inc on line 62 and defined in /home/.../includes/form.inc on line 1296.</li>
  <li>warning: array_key_exists() [<a href='function.array-key-exists'>function.array-key-exists</a>]: The second argument should be either an array or an object in /home/.../sites/all/modules/date/date/date_elements.inc on line 48.</li>
 </ul>

When I go back to re-edit, the FROM DATE and TO DATE fields are empty. However, if I resubmit the exact same node with a repeating function, I get no errors, and the node appears in all the appropriate views.

I am happy to provide other info if that helps. I am assuming this has something to do with ongoing development on the date-repeat-api for 6.x.

Thanks,
Maria

Comments

tobbe_s’s picture

I get the same error message when posting a date in a field for which repeating is enabled, but not used. Using Drupal 6.3 and Date6.x-2.x-dev(28-july-2008).

tobbe_s’s picture

Got the same error message
warning: Missing argument 3 for form_set_value(), called in /home/.../sites/all/modules/date/date/date_repeat.inc on line 62 and defined in /home/.../includes/form.inc on line 1296.
in date-2.x-dev (2008-Aug-01). form_set_value() on line 62 in date_repeat.inc needs a third argument, $form_state. The line should look like this:
form_set_value($element['rrule'], NULL, $form_state);

thelocaltourist’s picture

I'm getting the same msg. To work around it, I set it to repeat every day, to end on the day of the event. Works flawlessly!

karens’s picture

Status: Active » Fixed

I just committed some fixes for this.

tobbe_s’s picture

Version: 6.x-2.x-dev » 6.x-2.0-rc1
Status: Fixed » Active

I still see this happen in date-6.x-rc1. When I post a date to a field with repeat enabled, but provide no values for the repeat section, I get the error

warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /[...]/drupal/sites/all/modules/date/date/date_elements.inc on line 48.

If I set repeat to daily, ending on the same date as the event, the date field gets saved to database.

karens’s picture

Status: Active » Fixed

The original problem is fixed. The remaining problem you are seeing is probably #292617: Date Repeat errors when Date Popup module is turned off, which is a separate issue I'm working on now.

tobbe_s’s picture

I DO have Date Popup module enabled, and it has been enabled from "Day 1" when I first installed the Date package.

karens’s picture

Version: 6.x-2.0-rc1 » 6.x-2.x-dev

It's fixed in -dev. It is not fixed in rc1. You have to pick up the latest -dev version to pick up fixes. The rc versions are not changed, only -dev is. The changes roll into the next release.

I'm planning a new release later today, so you can wait for that.

tobbe_s’s picture

Aha, thanks for the info!

tyromind’s picture

Right on - I've been trying to kill this sucker for days. Tried all sorts of stuff, new content types, clearing old db stuff... couldn't get it and spent forever tracking down someone else who hit the same thing. The site'd just been transferred from a server running php4 to one with php5, so I was about to totally remove the date & calendar modules and re-install from scratch, phew.

I'll update if new dev fixes.

tyromind’s picture

Fixed - awesome job Karen.

karens’s picture

Thanks for the feedback! I just tagged a new release with these fixes.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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