Closed (fixed)
Project:
Webform
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 May 2011 at 09:10 UTC
Updated:
26 Sep 2011 at 19:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
quicksketchThanks for the report. Do you have Date module installed? I just need to know so I can reproduce the issue.
Comment #2
quicksketchHmm, with Date module installed I actually get Date fields with the day/month/year as though "today" where the default value.
Comment #3
szpeti commentedHi!
No, I don't have date module.
But now I installed the date module. If the default value is empty, I get todays date on the field. And if I set 0 as default, I get the fields empty.
It's ok for me this way.
Comment #4
szpeti commentedAfter removing the date module, it's still ok. I hope you can do something with this information.
Anyway, I'm glad, it's working now.
Comment #5
monotaga commentedI'm having a similar issue after upgrading to Webform 6.x-3.11 today (from 3.9). Rather than getting Jan 1, I'm getting Dec 31, 1969 (equiv to -1). I've got Date 6.x-2.x-dev (2011-Mar-14) installed. Screenshots attached
Comment #6
Jorrit commentedSubscribing. I also need to enter 0 as the default value to get no default value, whereas I think it used to be that an empty value would lead to no default value.
Comment #7
attheshow commentedSame issue here. I have date 2.7 installed with Webform 6.x-3.11.
Comment #8
lavamind commentedI have this issue as well. I don't have the date module installed, but I use date_popup. No default value leads to the current date being selected by default, and entering 0 leads to no date selected.
Comment #9
sagashiteirukedo commentedHi all -- observed the following on the Drupal 6.x w/ Webform 3.11 system I work with:
For an anonymous user, the date fields are pre-populated with the epoch. Given our timezone, that comes across as 12/31/1969.
Now, for a logged-in user, provided we have the Default Value set to 0, then the date fields just come back as Month Day Year. If we don't set the Default Value to 0, you instead get the current date pre-filled in.
Don't know if that'll help with the diagnosis, but hopefully it will!
Comment #10
szpeti commentedInstall v3.10 to have everything as before.
Comment #11
jelle_sI installed webform (6.x-3.11), created a new webform with only a date field, set the date range from -100 years to +2 years, default value empty or 0 doesn't make a difference, I always get 1 Jan 1970. Even when I enable the date module...
Comment #12
attiks commentedTested dev version as well, same behaviour
Comment #13
zmeharen commentedSubscribing. Leaving the date value blank gives Dec. 31 YEAR. I don't know if its related but the form is also making date values a required entry even though they are not set as mandatory. No Date Module installed.
Comment #14
quicksketchThanks for all the feedback guys. Here's the patch I've used to fix the problem, applied to both D6 and D7 branches.
Comment #15
quicksketchComment #16
attiks commentedThanks, works like a charm on D6
Comment #17
clawki commentedThat did it. Thank you.
Comment #18
monotaga commentedThe D6 patch in #14 seems to work for me so far. Any chance of getting this committed?
Comment #19
jelle_sI think it already is.
Comment #20
breeze76 commentedNot sure if this is the same issue that the patch fixes, But, when logged in the dates are all fine. But when viewing as anonymous user the date is as follows in each box, [Dec] [31] [year]. Views fine when logged in. So, if this patch fixes this issue, where does the patch go, like file, location in code??
Thanks...
Comment #21
attiks commented@breeze76: better open a new issue, looks like you have multiple locales active, for general information about patches and how to use them see http://drupal.org/node/707484
Comment #22
zmeharen commented@breeze76: It looks like your issue is very similar to what I posted before you, I just looked at the patch and manually made changes to the files as I saw them. It has worked fine on my live site. It was a short patch and I don't consider myself good with code but I figured it out just by looking at the patch file. Visit this link for more information http://drupal.org/node/534548
Comment #23
SchwebDesign commentedHello guys,i hate to mark this as not fixed again, but i also can't get the patch in #14 to work for me.
I'm using Webform 6.x-3.12, and Date module 6.x-2.7, and Drupal 6.22. I checked /sites/all/modules/webform/components/date.inc and verified the code from the patch in #14 was indeed already in place with this webform version.
I've tried:
setting a default value for the date component and leaving the default value empty
flushing all caches
deleting the date field and re-adding as a new one
none of the above works an the problem persists...
This only happens for me when anonymous user, everything works when logged in, as mentioned above. This seems to happen whether i have a default value set or not.
please see my screenshot attached
Since the patch seemed to work for everyone else, what could I be missing?
Any help would be greatly appreciated. Thanks for the great support here.
Comment #24
mstobbs commentedWhen will quicksketch's patch make it into the official release? I just checked 6.14 and the fix doesn't appear to be included yet. We'd prefer to not have to patch and test every webform release.
Comment #25
attiks commentedchanging back to fixed
Comment #26
vernond commented@mstobbs - I understand your frustration. quicksketch will back on the scene next week and we'll sort out our workflows to prevent this kind of thing going forward.
Comment #27
hfidge commentedSame problem:
Webform 6.x-3.11
Date 6.x-2.7
Adding 0 to the default value fixes this though - thanks for the pointers and patches in this thread :)
Comment #28
SchwebDesign commentedAfter being a bit disappointed that no one seemed to notice my comment in #23 (http://drupal.org/node/1162266#comment-4902686) I've realized that's perhaps because its a separate issue, and although mentioned above by a few other people, perhaps belongs in a different issue post.
I realized that the reason my date was only showing 1969 available for the year for anonymous users was because under "Default value timezone:" i had "User timezone" selected... of which of course (I suppose?) none is really "selected" for the anonymous user. Simply switching to "Website Timezone" fixed the issue stated in #23 for me. I'll open a separate issue related to anonymous user's timezone perhaps defaulting to the Website Timezone.
I hope this helps!
Comment #29
quicksketchHey guys, this fix *is* already included in Webform 3.14. See line 160:
http://drupalcode.org/project/webform.git/blob/refs/tags/6.x-3.14:/compo...
@SchwebDesign:
Yes this is a different issue entirely. Thanks for filing it under #1276550: Anonymous users do not use site default timezone.