unable to create node - invalid datetime format 1366 error

Created on 23 March 2023, over 1 year ago

Problem/Motivation

I am unable to create a node (article, basic page, whatever) : error:
I get both a node and a php error (using 7.4.33) - the same error, which I have perhaps misakenly posted in the core (field) issue queue. Does this issue belong here instead?:

PDOException: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'autocreate' for column `uslowestprices_0`.`field_data_field_tags`.`field_tags_tid` at row 1: INSERT INTO {field_data_field_tags} (entity_type, entity_id, revision_id, bundle, delta, language, field_tags_tid) 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); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 77 [:db_insert_placeholder_2] => 77 [:db_insert_placeholder_3] => page [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => autocreate ) in field_sql_storage_field_storage_write() (line 622 of /data/disk/fast1/static/d771/modules/field/modules/field_sql_storage/field_sql_storage.module).

(the strange path in the last line, above, is an aegir multisite path)

Steps to reproduce

I believe this is different from
https://www.drupal.org/project/date/issues/998076 🐛 Problem with timezone handling (caused by date_get_timezone_db returning only UTC) Needs work
that's why I have also posted it here.

Proposed resolution

Although the error message says "invalid datetime format" I have found that the real problem is entering null for field-tags - and that if I put in any field-tags than the node can be created and the error is not thrown, so I am closing thi sissue here, and leaving it open in core. The proble is in not accepting a null or blank field, even though it is not required.

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Closed: duplicate

Version

2.0

Component

Date Field

Created by

🇬🇧United Kingdom em-fast1

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024