Closed (fixed)
Project:
Entityform
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Dec 2013 at 09:56 UTC
Updated:
16 Feb 2014 at 17:10 UTC
Jump to comment: Most recent
Hi,
I tested EntityForms 2.0 beta 2 on a completely freah and clean Drupal 7.24 with only the latest modules required to run Entityform. No other unneccessary modules are installed for a complete and clean testing.
I created a new form type even without any date field, every time when I clicked submit, the following errors on Date occur.
I tried creating 2 Test Content Types with date and without date field respectively, no errors on posting. Only happen with EntityForms Type.
| Comment | File | Size | Author |
|---|---|---|---|
| entitydatebug.PNG | 14.78 KB | jetwodru |
Comments
Comment #1
tedbow@jetwong98 ok thanks for reporting this.
Comment #2
cutmedia commentedthe error only appears when in the form Submission page settings > Preview page is checked
Comment #3
tedbow@cutmedia, thanks for the info. It will make debugging easier.
Comment #4
akeimou commentedi also have Preview enabled. created date in $entityform is empty so the warning disappears when:
- format_date in function defaultLabel is changed to date("Y-m-d H:i:s")
- format_date in function _entityform_get_submit_info is changed to date("Y-m-d H:i:s"). also, the submission display no longer shows a blank date after "Submitted by Anonymous on"
is there a different field to use instead of $entityform->created when form is in draft?
Comment #5
tedbowI have found the problem. It was because the created date and user id wasn't set before the preview submission value was set. I just moved the code up.
I committed this change to 7.x-2.x
Comment #6
tedbow#akeimou in response to your question in #4 :
No $entityform->created is set the first time the form is submitted even if it is draft.
If you want to discuss that please create another issue.