"failed to parse time string" error

142 views
Skip to first unread message

Tim Hutchinson

unread,
May 7, 2012, 8:09:17 PM5/7/12
to ica-ato...@googlegroups.com
Hi,

One of our users has been getting an internal server error when
attempting to add or edit descriptive records. So far I've been unable
to replicate the problem, but here's a sample entry from the error log:

[Wed May 02 09:49:26 2012] [error] [client xx.xx.xx.xx]
DateTime::__construct(): Failed to parse time string ([1900]) at
position 0 ([): Unexpected character, referer: http://...-fonds;edit/rad

Any clues about what we should be looking for? Is it possible something
at the client end is affecting this?

Thanks
Tim

--
Tim Hutchinson
University of Saskatchewan Archives
301 Main Library, 3 Campus Dr.
Saskatoon, SK S7N 0G2
(306) 966-6028
e-mail: tim.hut...@usask.ca

Tim Hutchinson

unread,
May 8, 2012, 11:58:28 AM5/8/12
to ica-ato...@googlegroups.com
I still can't replicate this at my end, but the error seems to be
triggered when the user enters a date like [192?-] and then saves the
record.

Very odd.

Tim

Jesús García Crespo

unread,
May 9, 2012, 6:07:39 PM5/9/12
to ica-ato...@googlegroups.com
Hi Tim,

The DateTime constructor throws a code exception in some cases when the string can't be parsed, but our code is aware of that and it shouldn't become a fatal error. Was the user entering dates in the "Dates of creation area" dialog?

Regards,

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To post to this group, send email to ica-atom-users@googlegroups.com.
To unsubscribe from this group, send email to ica-atom-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ica-atom-users?hl=en.




--
Jesús García Crespo,
Software Engineer, Artefactual Systems Inc.
http://www.artefactual.com | +1.604.527.2056

Tim Hutchinson

unread,
May 9, 2012, 6:22:58 PM5/9/12
to ica-ato...@googlegroups.com
Hi Jesús,

Thanks. I just clued into what the user was doing. I can replicate the 500 error by entering the uncertain dates, e.g. [192-?], as the start or end dates, which of course should be free of punctuation.

However, I can't replicate this on the demo site. We're using 1.1, so maybe it got addressed in 1.2?

In any case we'll be able to deal with this by showing the user how to enter these dates correctly.

Tim


On 09/05/2012 4:07 PM, Jesús García Crespo wrote:
Hi Tim,

The DateTime constructor throws a code exception in some cases when the string can't be parsed, but our code is aware of that and it shouldn't become a fatal error. Was the user entering dates in the "Dates of creation area" dialog?

Regards,

On Tue, May 8, 2012 at 8:58 AM, Tim Hutchinson <tim.hut...@usask.ca> wrote:
I still can't replicate this at my end, but the error seems to be triggered when the user enters a date like [192?-] and then saves the record.

Very odd.

Tim


On 07/05/2012 6:09 PM, Tim Hutchinson wrote:
Hi,

One of our users has been getting an internal server error when attempting to add or edit descriptive records. So far I've been unable to replicate the problem, but here's a sample entry from the error log:

[Wed May 02 09:49:26 2012] [error] [client xx.xx.xx.xx] DateTime::__construct(): Failed to parse time string ([1900]) at position 0 ([): Unexpected character, referer: http://...-fonds;edit/rad

Any clues about what we should be looking for? Is it possible something at the client end is affecting this?

Thanks
Tim



--
Tim Hutchinson
University of Saskatchewan Archives
301 Main Library, 3 Campus Dr.
Saskatoon, SK S7N 0G2
(306) 966-6028
e-mail: tim.hut...@usask.ca

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To post to this group, send email to ica-ato...@googlegroups.com.
To unsubscribe from this group, send email to ica-atom-user...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/ica-atom-users?hl=en.




--
Jesús García Crespo,
Software Engineer, Artefactual Systems Inc.
http://www.artefactual.com | +1.604.527.2056
--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To post to this group, send email to ica-ato...@googlegroups.com.
To unsubscribe from this group, send email to ica-atom-user...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/ica-atom-users?hl=en.


-- 
Tim Hutchinson
University of Saskatchewan Archives
301 Main Library, 3 Campus Dr.
Saskatoon, SK S7N 0G2
(306) 966-6028
e-mail: tim.hut...@usask.ca

Jesús García Crespo

unread,
May 9, 2012, 6:31:02 PM5/9/12
to ica-ato...@googlegroups.com
Hi Tim,

Right, we fixed that in 1.2. This is the revision code:

Patching could be possible though. Just apply these changes:

Then run:
$ php symfony propel:build-model
$ php symfony cc
$ php symfony cc

Tim Hutchinson

unread,
May 9, 2012, 6:34:17 PM5/9/12
to ica-ato...@googlegroups.com
Great, thanks for letting me know.

Tim
Reply all
Reply to author
Forward
0 new messages