Hi,
I made a fresh install with this version (3.x-dev). When I run cron I get the following message:

PDOException: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '1332176400' for column 'field_event_date_value' at row 1: INSERT INTO {field_data_field_event_date} (entity_type, entity_id, revision_id, bundle, delta, language, field_event_date_value, field_event_date_value2, field_event_date_rrule) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 1546 [:db_insert_placeholder_2] => 1546 [:db_insert_placeholder_3] => evanced_events [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 1332176400 [:db_insert_placeholder_7] => 1332181800 [:db_insert_placeholder_8] => ) in field_sql_storage_field_storage_write() (line 448 of /***[install dir]***/modules/field/modules/field_sql_storage/field_sql_storage.module).

I double checked the field settings attached to my Evanced content type using the documentation and I played around with different time formats, but no luck. Wondering if this is related / similar to #1479456: Fails on Cron?
TIA

CommentFileSizeAuthor
#1 datefield-processing-fix-1489928.patch10.77 KBslanger

Comments

slanger’s picture

Assigned: Unassigned » slanger
Category: support » bug
Status: Active » Needs review
StatusFileSize
new10.77 KB

Hi txtualtrail:

Sorry that you encountered an error. As it ends up, this particular problem isn't related to issue #1479456. It has to do with the way the Evanced Events Importer processes the event date.

When you add a date field to a content type in D7, you are given three choices: Date, Date (ISO format), and Date (Unix timestamp). Right now, the Evanced Events Importer is saving the date as a Unix timestamp — regardless of which of these options was selected. I suspect that the date field you created is either in datetime or ISO format. Since the date being passed to the database isn't structured correctly, an error occurs.

The following patch will hopefully fix this problem. After you apply it (and this is important!), go to the module's "XML Mapper" screen (/config/development/evanced-events-importer/xmlmapper) and click the "Save configuration" button. This will ensure that your configuration data is updated as well. After that, you are free to run cron.

Let me know if this patch works for you (or if you have any trouble applying it).

slanger’s picture

The above bug fix is now included in a new development version of the module (7.x-4.x-dev). Please read the release notes before upgrading and follow the directions found there.

Let me know how it goes.

Anonymous’s picture

*facepalm* should have thought of that.
I appreciate your quick and thorough response and will keep you posted when I patch/upgrade.
Cheers!

Anonymous’s picture

I am happy to report that the upgrade to 7.x-4.x-dev solved the "invalid datetime format" issue that I experienced. I am very grateful for your support and the great work you have done with this module. Cheers!

slanger’s picture

Status: Needs review » Closed (fixed)

Thanks for reporting back, txtualtrail -- and for your very kind feedback. :-) I'm glad the problem has been corrected in the new version of the module.