Closed (fixed)
Project:
Date
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Mar 2009 at 10:42 UTC
Updated:
3 Apr 2009 at 13:00 UTC
Hello,
As asked by deshilachado I open a new issue for this bug report : http://drupal.org/node/386406#comment-1338238 (my date fields' default value is blank (not now), and the fields (when not completed) are automatically filled as "2009-01-01...")
Config. is : localhost (Wamp server), Drupal 6.10, php 5.2.8
Date modules enabled : Date API, Date, Date Timezone
CCK version is : 6.x-2.1
datefield code with 2.x.rc6 version of Date module (working properly)
$content[fields] = array (
0 =>
array (
'label' => 'Date',
'field_name' => 'field_lettre_date',
'type' => 'date',
'widget_type' => 'date_text',
'change' => 'Change basic information',
'weight' => '-1',
'default_value' => 'blank',
'default_value_code' => '',
'default_value2' => 'same',
'default_value_code2' => '',
'input_format' => 'Y-m-d H:i:s',
'input_format_custom' => '',
'advanced' =>
array (
'label_position' => 'above',
'text_parts' =>
array (
'year' => 0,
'month' => 0,
'day' => 0,
'hour' => 0,
'minute' => 0,
'second' => 0,
),
),
'increment' => 1,
'year_range' => '-3:+3',
'label_position' => 'above',
'text_parts' =>
array (
),
'description' => '',
'group' => false,
'required' => 0,
'multiple' => '0',
'repeat' => 0,
'todate' => '',
'granularity' =>
array (
'year' => 'year',
'month' => 'month',
'day' => 'day',
),
'output_format_date' => 'm/d/Y - H:i',
'output_format_custom' => '',
'output_format_date_long' => 'l, F j, Y - H:i',
'output_format_custom_long' => '',
'output_format_date_medium' => 'D, m/d/Y - H:i',
'output_format_custom_medium' => '',
'output_format_date_short' => 'm/d/Y - H:i',
'output_format_custom_short' => '',
'tz_handling' => 'none',
'timezone_db' => '',
'op' => 'Save field settings',
'module' => 'date',
'widget_module' => 'date',
'columns' =>
array (
'value' =>
array (
'type' => 'varchar',
'length' => 20,
'not null' => false,
'sortable' => true,
),
),
'display_settings' =>
array (
'weight' => '6',
'parent' => '',
'label' =>
array (
'format' => 'above',
),
'teaser' =>
array (
'format' => 'field_lettre_date_long',
'exclude' => 0,
),
'full' =>
array (
'format' => 'field_lettre_date_long',
'exclude' => 0,
),
4 =>
array (
'format' => 'field_lettre_date_long',
'exclude' => 0,
),
2 =>
array (
'format' => 'field_lettre_date_long',
'exclude' => 0,
),
3 =>
array (
'format' => 'field_lettre_date_long',
'exclude' => 0,
),
'token' =>
array (
'format' => 'field_lettre_date_long',
'exclude' => 0,
),
),
),
);
datefield code with 2.0 and 2.x-dev versions of Date module (bug on "blank" default value option)
$content[fields] = array (
0 =>
array (
'label' => 'Date',
'field_name' => 'field_lettre_date',
'type' => 'date',
'widget_type' => 'date_text',
'change' => 'Change basic information',
'weight' => '-1',
'default_value' => 'blank',
'default_value2' => 'same',
'default_value_code' => '',
'default_value_code2' => '',
'input_format' => 'Y-m-d H:i:s',
'input_format_custom' => '',
'advanced' =>
array (
'label_position' => 'above',
'text_parts' =>
array (
'year' => 0,
'month' => 0,
'day' => 0,
'hour' => 0,
'minute' => 0,
'second' => 0,
),
),
'increment' => 1,
'year_range' => '-3:+3',
'label_position' => 'above',
'text_parts' =>
array (
),
'description' => '',
'group' => false,
'required' => 0,
'multiple' => '0',
'repeat' => 0,
'todate' => '',
'granularity' =>
array (
'year' => 'year',
'month' => 'month',
'day' => 'day',
),
'default_format' => 'short',
'tz_handling' => 'none',
'timezone_db' => '',
'op' => 'Save field settings',
'module' => 'date',
'widget_module' => 'date',
'columns' =>
array (
'value' =>
array (
'type' => 'varchar',
'length' => 20,
'not null' => false,
'sortable' => true,
'views' => true,
),
),
'display_settings' =>
array (
'weight' => '6',
'parent' => '',
'label' =>
array (
'format' => 'above',
),
'teaser' =>
array (
'format' => 'field_lettre_date_long',
'exclude' => 0,
),
'full' =>
array (
'format' => 'field_lettre_date_long',
'exclude' => 0,
),
4 =>
array (
'format' => 'field_lettre_date_long',
'exclude' => 0,
),
2 =>
array (
'format' => 'field_lettre_date_long',
'exclude' => 0,
),
3 =>
array (
'format' => 'field_lettre_date_long',
'exclude' => 0,
),
'token' =>
array (
'format' => 'field_lettre_date_long',
'exclude' => 0,
),
),
),
);
Tell me what you need more...
Good luck ! thanks,
Comments
Comment #1
Junro commentedsuscribe :)
Comment #2
headkit commentedi am in
btw: one version before this problem was not there!
Comment #3
mRs- commentedsame problem here
Comment #4
mikeytown2 commentedditto #401472: Year: Default Blank, get's set to NOW if left null.
Comment #5
davidhk commentedsubscribe
Comment #6
extect commentedsame problem here with latest dev-version.
Comment #7
Junro commentedcritical because this is really really really critical lol I can't put my site on production with this bug... anyway, I've got another bugs to fix before :)
Comment #8
choster commented"Critical" bugs are those which cause loss of data or render a site unusable.
Comment #9
Junro commentedoh ok, didn't know there was a definition to critical :) Thans for this info!
Comment #10
RoboPhred commentedsuscribe
Comment #11
splashworx commentedSame with me. Previous version was working fine but the update reverts to 2009-1-1.
Setting any value to 'now' shows 1-1-2009. 'Now + 7 days' also returns 1-1-2009 regardless of 'days'.
Comment #12
extect commented@splashworx: The issue regarding "now" as default value has been fixed already. Have a look at #386406: After module upgrade, Views filter value "now" incorrectly outputs 2009-01-01
Comment #13
headkit commented@extect: yes, but this issue is about a default value equals blank (not now).
;-)
Comment #14
Junro commentedLast dev. version of Date (and CCK) not fixe the problem for me.
Comment #15
karens commentedI can replicate the problem, but only using the 'Text' widget. I can't tell if everyone reporting this is using that widget, but the ones that provided enough information seem to be. The problem goes away if you switch to either the 'Select' or the 'Popup' widgets. Working on a fix for this now...
Comment #16
karens commentedI think I have this fixed in -dev now. Still doing some more testing, but I have committed a fix.
Comment #17
Junro commentedGreat new! :)
Thanks a lot ^^
Comment #18
Junro commentedok, just test the lest dev. version.
I've still got the problem, but if I take off hte 2009-01-11 from my cck field and i can't save the node, I have this:
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
There are errors in Année:
The To date must be greater than the From date.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
There are errors in Allemagne (reprise) value #2:
The To date must be greater than the From date.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
There are errors in Allemagne (reprise) value #3:
The To date must be greater than the From date.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
There are errors in Allemagne (reprise) value #4:
The To date must be greater than the From date.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
There are errors in Allemagne (reprise) value #5:
The To date must be greater than the From date.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
There are errors in Allemagne (reprise) value #6:
The To date must be greater than the From date.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
There are errors in Allemagne (reprise) value #7:
The To date must be greater than the From date.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
There are errors in Allemagne (reprise) value #8:
The To date must be greater than the From date.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
There are errors in Allemagne (reprise) value #9:
The To date must be greater than the From date.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
There are errors in Allemagne (reprise) value #10:
The To date must be greater than the From date.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
There are errors in Allemagne (reprise) value #11:
The To date must be greater than the From date.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
There are errors in Allemagne (reprise) value #12:
The To date must be greater than the From date.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
There are errors in Allemagne (reprise) value #13:
The To date must be greater than the From date.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
(many times)
Comment #19
Junro commentedI can't save nodes with a CCK date field.
On this node, I just have one cck date field with a value already set (so I don't have 2009-01-01), i've got this:
warning: array_shift() [function.array-shift]: The argument should be an array in /home/pariscin/www/includes/form.inc on line 1320.
There are errors in Année:
The To date must be greater than the From date.
Comment #20
iko commentedHello,
the -dev version doesn't fix the problem for me.
I updated CCK to 6.x.2.2
thanks,
Comment #21
aren cambre commentedsubscribe
Comment #22
karens commentedI just committed the fix this morning and I can't tell if you are actually using the code with the fix. If you use the tarball from the project site, you do not have the fix until the tarball gets updated, probably tonight. If you are definitely using the latest code (which is only if you got it directly from cvs and not the tarball) I need to know exactly specifically what kind of date field and widget and settings you are using.
The problem was very specific to a certain combination of settings so without knowing that there is nothing I can do. I need to see all your settings (easiest way is to create an export of the date field using Content Copy). You need to make it clear what you did to test it. Did you go back and re-edit the date field to be sure it is set up correctly and re-save it? Are you seeing an error when creating a new field or editing and existing field? Exactly what date did you try to enter into the field? Etc Etc.
Comment #23
Junro commentedoh ok, I'm using the tarball from the profect site, I don't have CVS access.
But I still have the bug describe above:#18 and #19.
"Did you go back and re-edit the date field to be sure it is set up correctly and re-save it?" yes, but can't save it.
Comment #24
Junro commentedAnyway, it would be another issue (I will create it if I don't fixe it myself).
So, I will wait the next dev. version for this issue :)
Comment #25
karens commentedYou will have the bug until you get the fix, so you have to wait for the tarball to update.
Comment #26
Junro commentedok, fixed with the last dev. version :) Thanks! ^^
ps: You have to take off all date fields with 2009-01-01 value yourself.
2009-01-01 is not dissappear automatically.
Comment #27
karens commentedYes, if you saved those values you'll have to fix them yourself. I can't do that automatically because I have no way to know if that was the desired date or not.
Comment #28
Junro commentedSure, no problem for me, some 500 fields to erase, not funny time lol but it will be quick!
Thanks again, trully appreciate your work!
Comment #29
iko commentedActually, I used the tarball yesterday (I don't even know what is a CVS !) ; with the new one (03.20.2009), the problem of automatically-filled field is fixed.
But when saving the node (either creating or updating), I can see this warning : "warning: date_timezone_set() expects parameter 1 to be DateTime, null given in C:\wamp\www\...\sites\all\modules\date\date\date_token.inc on line 43."
I don't know what it means (do I have to do something... ?) : I was wondering whether it was related to my field's settings (in particular the Time zone handling, which I set to No time zone conversion), but I don't see the warning when I fill the date field. Do you have an idea ?
Anyway, thanks a lot for the fix !!
Comment #30
karens commentedThe last issue is #408176: Date token error. Working on a fix for that in the other issue.
Comment #31
Junro commentedCVS is a dev. version for devellopers only (with restrict access), dev. version where they worked with. (pas du très bon anglais ça je pense lol).
For the timezone warning, I don't know, I don't have it.
Comment #32
iko commentedok, thanks KarenS !
Comment #33
headkit commented@Junro:
the fastest way is to fix the 500 dates directly in your database. use something like
Comment #34
Junro commentedhum, yes it will be faster, just didn't think about it. Thanks ^^.
Comment #35
karens commentedIf you fix them in the database, be sure to empty the cache_content cache so you don't see the old values when you view the nodes.
Comment #36
headkit commentedafter updating, deleting the date from one of the date fields set to blank in the settings and re-saving the node i had the message
"warning: date_timezone_set() expects parameter 1 to be DateTime, null given in ...\sites\all\modules\date\date\date_token.inc on line 43."
when i re-open again, the field is empty but that message comes back when i save the node.
Comment #37
karens commentedThat is already reporting in another issue and I fixed it this morning, see #30. Unless you updated your code directly from cvs a couple minutes ago, you don't have those fixes.
Comment #38
Junro commented@headkit & Karens
I've done with my database.
Thanks for all these informations, it will be very helpful for others guys in the same situation.