Not sure if this is 1 or 2 bugs.
If you create a content type with a date field and set the number of values to 1 and save. Re-edit and set Repeat dates to yes and save. The number of values will appear to be automatically,changed to unlimited.
However creating content with repeating dates does not work.
Error given is:
Warning: implode() [function.implode]: Invalid arguments passed in form_error() (line 1614 of /services3/webpages/k/i/kidsacademy.ca/public/cms/includes/form.inc).
Which I think is error 2. (form error seems to be being called without an $element value)
The error would have been 'Date: this field cannot hold more than 1 values' from line 84 of field.default.inc

If you manually set number of values to unlimited before setting repeat dates, everything works as expected.

Thats as far as i got.

Comments

hejeva’s picture

Getting same error.

mattrweaver’s picture

I got this error, too

Warning: implode() [function.implode]: Invalid arguments passed in form_error() (line 1614 of path_to_site/includes/form.inc).

I only get it with repeating events.

hejeva’s picture

This appears to be fixed in if you get Date 7.x-2.0-rc2. So it wasn't a calendar issue but a date issue.

tonyhead’s picture

Version: 7.x-3.0-alpha2 » 7.x-3.0-rc1

I got the same error with lastest Calendar 7.x-3.0-rc1 + Date 7.x-2.1 + Views 7.x-3.2.

Warning: implode() [function.implode]: Invalid arguments passed 在 form_error() (行 1616 在 /home/abc/public_html/abc.com/includes/form.inc).

zyexal’s picture

Version: 7.x-3.0-rc1 » 7.x-3.0
Assigned: Unassigned » zyexal

same here

Date 7.x-2.2+8-dev

drupalninja99’s picture

I am getting the same issue.

mattrweaver’s picture

I have tried all of the latest versions of the constituent modules. I am still getting this error.

karens’s picture

Status: Active » Closed (cannot reproduce)

Unable to replicate any problem. You need to use the latest dev versions of both Date and Calendar and be sure you are not using any deprecated calendar items. If you've used older version of the calendar delete or revert them (you will have an option to do one or the other), then create a new one using the template.

If there's still a problem I need to you tell me how to create the error from a fresh install, step by step.

rebecca.ellis’s picture

Did anyone figure this out or submit a new issue? I'm having the same problem and want to follow / figure it out.

mattrweaver’s picture

It's not an issue with calendar. I get the same problem with FullCalendar. Must be date module, which I've tried various versions of, with no success.

frak.

azovsky’s picture

Project: Calendar » Date
Version: 7.x-3.0 » 7.x-2.x-dev

This is errors in the Date module.

#1. Warning: implode() [function.implode]: Invalid arguments passed in form_error() (line 1614 of /services3/webpages/k/i/kidsacademy.ca/public/cms/includes/form.inc).

For fix this need change in the file date.module, function date_field_widget_error (line 381 / 7.x-2.x-dev 2012-May-12):

function date_field_widget_error($element, $error, $form, &$form_state) {
  // Delete
  // form_error($element[$error['error']], $error['message']);

  // Add
  form_error($element, $error['message']);
}
ohthehugemanatee’s picture

StatusFileSize
new513 bytes

The trivial patch from #11 worked for me. Attaching in patch format for review.

ohthehugemanatee’s picture

Status: Closed (cannot reproduce) » Needs review

augh forgot to update status.

@KarenS This issue seems to be reproduced in several threads... probably because it's generic to error processing with repeats. The root error message might explain some of the other threads where people could just rebuild the field and everything would be OK... Anyway I thought this thread would be the best place to attach the patch, since this is where the fix was reported.

Status: Needs review » Needs work

The last submitted patch, 1391464-12-date-repeat-error.patch, failed testing.

ohthehugemanatee’s picture

Bah - wrong root for the patch. Attached an improved one.

ohthehugemanatee’s picture

Status: Needs work » Needs review
karens’s picture

Still no one has told me how to reproduce the problem, except to say "This issue seems to be reproduced in several threads". If the steps to reproduce the problem are on some other issue, I need a link to a specific place where that is described. Without steps to reproduce this will sit here until I happen to stumble across a way to see the problem, which may or may not ever happen.

karens’s picture

Status: Needs review » Postponed (maintainer needs more info)
drakythe’s picture

Status: Postponed (maintainer needs more info) » Needs review

KarenS,

I've now successfully recreated this on both 2.5 and 2.x-dev. Here are the steps I followed.

  1. Created a new, clean drupal 7.14 install
  2. Downloaded the latest 2.x-dev version of the date module
  3. Enabled the following: Date, Date API, Date Repeat API, and Date Repeat Field
  4. Make sure my site's Date and Time settings are set per Date's requirements
  5. Create a new content type, leaving everything default, I named it "Event"
  6. I added a new field to the content type called "Date" I selected the date field, and left the widget as a select list. For the following 2 settings screens, I left everything default, so no repeat and only 1 value allowed. Save.
  7. Then I edited the Date field, switching the "no" on Repeat date to "yes." Save.
  8. Now I tried to add a new content of Event type, with simply a name, a date time of one how in the future, repeating weekly on Mondays, to expire after 52 events. Save node

This process has resulted in the form_error() implode error mentioned in the first post. Since the following code:

/**
 * Implements hook_field_widget_error().
 */
function date_field_widget_error($element, $error, $form, &$form_state) {
  form_error($element[$error['error']], $error['message']);
}

lines 377-382 in date.module

Seems to be the hangup I ran it through a debugger and got the following results for $error

Name:      |  Type:         |  Value:
[error]    |  string        |  "field_cardinality"
[message]  |  string        |  "<em class="placeholder">Date</em>: this field cannot hold more than 1 values."

I'm not expert on what exactly is going on, but it looks like when the node type is updated to allow for repeating dates, it is not updated to allow more than 1 value correctly, as it should be. I hope this helps.

drakythe’s picture

Title: Multiple values and repeat dates » Setting repeat of date field after initially creating field results in "Invalid arguments passed in form_error()"

Sorry for the multi-post but I felt like the issue could use a rename, and I found two other issues that I marked as duplicates because they seem to all be symptoms of this same problem ( #1432928: warning: implode() invalid parameters #1535936: Problem with repeats and FullCalendar )

hejeva’s picture

Version: 7.x-2.x-dev » 7.x-2.5

Ran into this same error again on new site I am building. Basically created an event and made it repeatable.
When creating a new event: I get the invalid argument form_error().
If I apply the patch described above, I get the following error " Date: this field cannot hold more than 1 values."

I looked at the how the date field was setup and the field is set to unlimited values.

Date: 7.x-2.5

drakythe’s picture

Version: 7.x-2.5 » 7.x-2.x-dev

hejeva,

The patch won't fix the error, the root of the problem is a lot different than what it addresses. In order to get rid of that error you need to remove your current date field (just delete it) and then recreate it with all the appropriate options selected at the time you create it. If you edit the field after creation to allow for repeating dates, you will get this error.

Also, please keep the version at the latest -dev release.

mixxmac’s picture

Setting the Number of Values to Unlimited under Global settings fixed the error for me. Before, I had left the Number of Values as 1, thinking that choosing Repeating Date = Yes was all I needed to do. I thought I needed 1 repeating date, not Unlimited repeating dates.

Not sure if that is the reason for this error, but it seems to be working so far. I'm using version 7.x-2.5 of the date module.

Renee S’s picture

Status: Needs review » Needs work

Fresh install, after adding a Date repeating field to an entity, I see this error on entity save. "Unlimited" is set (and indeed greyed out). I'm running 2.6 of Date. Updating to the latest dev seems to have fixed it.

bdupls’s picture

If you specify a Stop repeating date On Date: well into advance 2020-01-01 This solves the problem.

I would consider this a bug on the module as the 'it seems to come from the Stop reading After # occurrences field, but there is a way around it until it gets fixed

bellerophons_pegasus’s picture

I've got the same problem. As soon as I set an event to be repeated more than once, I get:
Warning: implode(): Invalid arguments passed in form_error()

I use Calendar 7.x-3.4 and Date 7.x-2.6+2-dev (2012-Sep-30).

davidneedham’s picture

StatusFileSize
new66.09 KB

The patch in #15 did not work for me. After applying the patch and clearing my cache, I get a form validation error whenever trying to save a new or existing node with the date field: Date: this field cannot hold more than 1 values.

A screenshot is attached.

bellerophons_pegasus’s picture

Just tried the workaround of #22. It works!
Thank you!

calebtr’s picture

I wanted to add that when you get this error, your repeated dates are not saved in the database.

#22 also worked for me. It seemed like I needed to come up with a new machine name for the field, also, even after deleting the original field.

calebtr’s picture

Issue tags: +fixed in dev?

I was poking around the dev version of the module and couldn't reproduce the problem.

I started with a fresh (dev) D7 installation, installed Date-7.x-2.x-dev, created a field with the limit 1 and no repeating, saved it, and was able to later update it to a repeating date.

The form kept me from changing the repeat status if there as any content in the field.

Is this fixed in dev?

eft’s picture

Issue summary: View changes
Status: Needs work » Closed (fixed)

This issue was fixed in 2012 and was included in the release of Date 7.x-2.7 in December 2013. The commit message unfortunately doesn't reference the issue number or symptoms but you can see how KarenS sorted the problem via link to commit below.

http://drupalcode.org/project/date.git/commit/f2222617226951cc911f026429...

Marking as fixed.

cmonnow’s picture

For anyone interested, I haven't updated beyond Date 7.x-2.6 yet and have some other heavy hacks that need transferring so for now I applied the "cardinality" patch manually as linked to in #31.

I had to remove the date field and re-create for the error to disappear. It works as expected with 1 Date field set (no need to set unlimited) and using the original field name didn't pose a problem as reported previously.

esmitex’s picture

I had the following error:

Warning: implode(): Invalid arguments passed in form_error() (line 1698 of /homepages/45/d444012100/htdocs/smq/includes/form.inc).

I applied the patch and it causes this error:

Date d'intervention: this field cannot hold more than 1 values.

So I set the multivalue settings to "This field can hold more than 1 value".

And it causes this error:

Fatal error: Call to a member function modify() on a non-object in /homepages/45/d444012100/htdocs/smq/sites/all/modules/rules/modules/rules_core.eval.inc on line 174

Line 174:       $date->modify("$months months $days days $sec seconds");
gramoun_kal’s picture

This is how it happened to me:

I first created my events with dates without a repeat option. I changed my mind about it, deleted all the content, enabled the "date repeat" module that comes with "date" and edited my previously-repeatless-dates so it would allow for repetion.

On saving my first event, I was served the error message and only the first node was created.

Deleting the date field and re-adding it did fix the problem.