Using Drupal 7.9, Date 7.x-2.0-alpha4:

1. Deploy module

2. Create a node type with a Partial Date field, and when I save the configuration I get:

Notice: Undefined variable: item in partial_date_field_validate() (line 215 of C:\Users\Adam.Browne\Sites\ppatlas2\sites\all\modules\partial_date\partial_date.module).
Notice: Undefined variable: message in partial_date_field_validate() (line 218 of C:\Users\Adam.Browne\Sites\ppatlas2\sites\all\modules\partial_date\partial_date.module).
Notice: Undefined variable: delta in partial_date_field_validate() (line 216 of C:\Users\Adam.Browne\Sites\ppatlas2\sites\all\modules\partial_date\partial_date.module).
Notice: Array to string conversion in partial_date_field_validate() (line 232 of C:\Users\Adam.Browne\Sites\ppatlas2\sites\all\modules\partial_date\partial_date.module).
Notice: Undefined index: in field_default_form_errors() (line 371 of C:\Users\Adam.Browne\Sites\ppatlas2\modules\field\field.form.inc).
Warning: implode() [function.implode]: Invalid arguments passed in form_error() (line 1614 of C:\Users\Adam.Browne\Sites\ppatlas2\includes\form.inc).

3. The blank field shows up correctly when I try to create a new content node

4. But every time I try to preview or save the node (even if there's no data in the partial-date field) I get a 101 error and the following PHP notices in the logfile:

Notice: Array to string conversion in partial_date_field_validate() (line 232 of C:\Users\Adam.Browne\Sites\ppatlas2\sites\all\modules\partial_date\partial_date.module).
Notice: Undefined variable: delta in partial_date_field_validate() (line 216 of C:\Users\Adam.Browne\Sites\ppatlas2\sites\all\modules\partial_date\partial_date.module).
Notice: Undefined variable: message in partial_date_field_validate() (line 218 of C:\Users\Adam.Browne\Sites\ppatlas2\sites\all\modules\partial_date\partial_date.module).
Notice: Undefined variable: item in partial_date_field_validate() (line 215 of C:\Users\Adam.Browne\Sites\ppatlas2\sites\all\modules\partial_date\partial_date.module).

Let me know if there's any more info I can provide... many of us have been waiting for just such a module for ages.

CommentFileSizeAuthor
#3 partial_date.zip12.27 KBalan d.

Comments

alan d.’s picture

Title: Problems, I'm afraid... » Errors / notices in the field validation functions
Priority: Critical » Major

Try the latest version, Alpha2, I think I found these this morning as I deployed to the developmental server from my local installation.

adam_b’s picture

Afraid I can't open Alpha2 - both the .tar.gz and the .zip files appear to be corrupted.

alan d.’s picture

StatusFileSize
new12.27 KB

The bot will still be zipping it up. Here is a copy of the local git repository.

adam_b’s picture

Yes, sorry - the download worked when I tried later.
But I'm still having problems with the module.

This time when I save the configuration (for Partial Date, using all the default settings) I see the message:
Notice: Array to string conversion in partial_date_field_validate() (line 224 of C:\Users\Adam.Browne\Sites\ppatlas2\sites\all\modules\partial_date\partial_date.module).

Again, when I preview or save the node, with or without any data in the field, I get a 101 (ERR_CONNECTION_RESET) error. I'm running on a local AcquiaDev copy of Drupal, so the problem can't actually be a bad connection. The syslog just shows the same notice:
Notice: Array to string conversion in partial_date_field_validate() (line 224 of C:\Users\Adam.Browne\Sites\ppatlas2\sites\all\modules\partial_date\partial_date.module).

alan d.’s picture

I found more notices and I have fixed these, but I could not replicate the connection reset. The reported notice should not cause this.

So into detective mode:

So how have you set this up? Can you list every field that is enabled / disabled.
What version of Date are you using?
PHP version / Database type
Was it a fast or slow delay before you got the connection reset (like was it very fast or did it take a couple of seconds?)
Anything else that may interact with a date or field (sorry, I would not know the answer to this myself atm)

BTW, I would reedit the settings page after updating to alpha 3 to ensure that these are set up correctly (due to fixes pushed through in the last hour). Even more proactive would be to delete and readd the field again.

It's late, but I'll try and followup more tomorrow.

adam_b’s picture

Status: Active » Fixed

Okay, uninstalled everything (including all other non-core modules), restarted the server and tried again with alpha3.

This time it all worked fine - so it was either some fix you made or a clash with another module.

I'll keep an eye on what happens when I start re-adding modules, but in the meantime, many thanks :)

adam_b’s picture

Version: 7.x-1.0-alpha1 » 7.x-1.0-alpha3
Priority: Major » Normal
Status: Fixed » Active

Minor update: when I try to edit a node which has previously been saved with a blank partial-date field, I'm getting this notice:
Notice: Undefined index: year_to in partial_date_field_is_empty() (line 322 of C:\Users\Adam.Browne\Sites\ppatlas2\sites\all\modules\partial_date\partial_date.module).

But it doesn't appear to be stopping anything - so still a big improvement.

alan d.’s picture

Status: Active » Closed (won't fix)

Closing as of Alpha4, this is effectively a new module. Please reopen new threads if you discover any issues.

alan d.’s picture

Issue summary: View changes

added "(even if there's no data in the partial-date field)"