500 - DateTime::__construct(): Failed

  • Posts: 101
  • Thank you received: 12
11 years 6 months ago #101547

Hi,

Not sure if this really a bug or not.

I've got a custom order field from the type Date which is only shown when in the previous radio button field "I would like to collect my order" was selected.
Date format: is %d/%m/%Y



When I choose "I would like to collect my order" AND pick a date AND also check the Terms of agreement then everything works.
When I pick a date BUT don't check the agreement I get the following error.

500 - DateTime::__construct(): Failed to parse time string (15/05/2013) at position 0 (1): Unexpected character


So strange that it works when everything is choosen but as soon as you forget the agreement then you get the Date error.


While I was typing this post I got an idea and tried the following:
I changed the date format back to %Y-%m-%d.
And now I get the "normal" error message that I need to accept the agreement.

Any idea how to resolve this?
In belgium we use dd/mm/yyyy format that's why I tried d%/m%/Y%

EDIT: I just tried with %d-%m-%y and this seem to work. Still like to know what the problem is with the slashes? can you reproduce the problem?

Thanks

Last edit: 11 years 6 months ago by SG. Reason: see Edit note

Please Log in or Create an account to join the conversation.

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
11 years 6 months ago #101622

Hi,

We don't know of such problem on our end and couldn't reproduce with %d/%m/%Y

I can see that you talked about d%/m%/Y% in your message. That would indeed produce such error since the % and the letters are reversed. So maybe it comes from that ?

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum