"Incorrect date value" when saving dates

628 views
Skip to first unread message

mbut...@gmail.com

unread,
Jan 17, 2019, 12:56:45 PM1/17/19
to AtoM Users
I'm getting the following error: 

2019/01/17 17:18:48 [error] 18812#18812: *104854 FastCGI sent in stderr: 
"PHP message: Unable to execute INSERT statement. 
[wrapped: SQLSTATE[22007]: Invalid datetime format: 
1292 Incorrect date value: '2019-0-0' for column 'start_date' at row 1]" 
while reading response header from upstream, client: 181.30.36.6, server: _, 
request: "POST /index.php/informationobject/add HTTP/1.1", 
upstream: "fastcgi://unix:/run/php7.0-fpm.atom.sock:", 
host: "archivo.museomoderno.org", 
referrer: "http://archivo.museomoderno.org/index.php/informationobject/add"

when trying to create or edit a description.

A way to avoid the error is not to fill the "start" and "end" date fields.

Any ideas?

Karl Goetz

unread,
Jan 17, 2019, 4:42:38 PM1/17/19
to ica-ato...@googlegroups.com
Hi,
Couple of questions

* Which version of atom are you running
* Did you enter 2019-0-0
* have you tried (for example) to only enter ‘2019’

According to https://wiki.accesstomemory.org/images/c/c7/Atom-ERD-2018-11-15_qa-2.5.png start_date is a ‘date’ field, but the help on the ‘Date(s)’ part of the UI - at least for 2.4 - says its a free text field. If that has changed it may partly explain what you are seeing.

Karl.

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at https://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/c289ce2b-eb63-4963-916e-1cf8de206be3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Karl Goetz,  Senior Library Officer (Library Systems)
University of Tasmania, Private Bag 25, Hobart 7001
Available Tuesday, Wednesday, Thursday



University of Tasmania Electronic Communications Policy (December, 2014).
This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.

Dan Gillean

unread,
Jan 18, 2019, 10:37:55 AM1/18/19
to ICA-AtoM Users
Hi there, 

I would add a few questions to Karl's as well, such as: 
  • Did you follow our recommended installation instructions?
  • If yes, are you using Ubuntu 16.04 or 14.04?
  • If no, what changes have you made?
  • What is the default installation culture of your AtoM instance, and what language in the interface were you using when trying to create the descriptions?
  • Did you create the description via the user interface, or via an import?
AtoM has 3 date fields - the display date (which is free-text), as well as two controlled date fields (start and end) that expect data formatted to ISO 8601: YYYY-MM-DD, YYYY-MM, or YYYY. 



However, I tried to recreate this issue in my local vagrant box (running qa/2.5.x) as well as on our public demo site (currently still running 2.4.0), and I was unable to reproduce the error. We have a JavaScript helper on the Start and End date fields, and for me, on save the -0-0 was stripped. When I re-enter edit mode after saving, my start and end dates (entered as 2019-0-0) were saved as 2019. 

If you can provide more information on your installation environment, as well as some exact steps to reproduce the error, hopefully we can provide further suggestions to help you! 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


Reply all
Reply to author
Forward
0 new messages