Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, i create a new installation on my local server, on this i set a new content type (test) and add to this a new date field (selection), after that i go to create a new content (?q=node/add/test) and create node, but date are not saved into DB, if i go on table content_type_test i find a column called field_data_value but is empty.
Anyone can help me to solve the problem? I find into issues but don't find similar problem.
This is settings on my server, and module are only default + cck + date (vesion specified)
Drupal 5.10
GD library bundled (2.0.34 compatible)
MySQL database 5.0.51
PHP 5.2.5
PHP register globals Disabled
Unicode library PHP Mbstring Extension
Web server Apache/2.2.6 (Win32) mod_autoindex_color PHP/5.2.5
CCK 5.x-1.7
Date 5.x-2.0-rc6
DateAPI 5.x-2.0-rc6
Date Timezone 5.x-2.0-rc6
Comments
Comment #1
michaek CreditAttribution: michaek commentedWhen I roll back to date rc5, this issue is resolved. You might give that a try.
Comment #2
mavimo CreditAttribution: mavimo commentedI'm go back to 1.8 with some patch obtained from 2.0-rc6, for example to set date-time range into drop-down date (on 1.8 i cannot set -X:-Y, but only -X:+Y).
This is just a bug report hto help dev to solve problem :D
Comment #3
KarenS CreditAttribution: KarenS commented@mavimo - I don't know why you're talking about "1.8", that's a different version that works completely differently. I don't see any reference anywhere in this issue to not being able to set a year range and can't see how that would be related.
As for the original issue, I can't replicate this, I can create dates just fine, so there must be something specific in the kind of date you're trying to create. I need an export of your date field (use the Content Copy module to create this).
Comment #4
michaek CreditAttribution: michaek commentedwhen i updated to rc6 from rc5, it appeared to stop saving dates. doesn't seem i'm the only person having this problem. i will look into this more over the weekend and determine whether its a config problem or a conflict with another module.
Comment #5
LinL CreditAttribution: LinL commentedFurther to #294964: Date field as Select List no longer saves) I'm moving it over to this issue.
Here are exports of my date field, first with a widget type of text and secondly with a widget type of select.
When the field is text it is saved and when it is a select box it is not.
Please let me know if you need any more info.
(Drupal 5.10, PHP 5.2.4, MySQL 5.0.51a)
Comment #6
LinL CreditAttribution: LinL commentedI have had a look at this and I think I have figured out where the problem lies. (Though I am quite new to Drupal, so could easily have missed something critical!)
Looking at version 5.x.2.0-rc6.
In the function
date_select_validate
indate_api_elements.inc
the variable$value
is set at the start (line 386) and at that point contains the correct data, but by the time it is referenced at line 426 it is empty.I haven't figured out why or how it is empty, but in my use case it is.
I added this line after line 425:
$value = date_select_input_value($element);
and in context:
and all appears to work OK.
Sorry, I haven't yet figured out how to make a proper patch file to attach with a diff against cvs, this is the closest I got:
Comment #7
LinL CreditAttribution: LinL commentedChanging status for #6.
Comment #8
tille CreditAttribution: tille commentedthank you very much - adding one line of code is really not such a pain.. I almost de-installed various modules - good that it's 'only' a fixable bug..:]
greetz, t..
Comment #9
KarenS CreditAttribution: KarenS commentedI think this is coming from the same problem as #292617: Date Repeat errors when Date Popup module is turned off and that fixing that problem will fix this one, too. It is not the regular select widget that is creating this problem, it's the one in the repeat form.
Marking duplicate because that's where we'll track the fix.