Closed (fixed)
Project:
Date
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Sep 2006 at 08:11 UTC
Updated:
15 Oct 2006 at 20:00 UTC
Hey,
I'm trying a fresh install:
* Drupal 4.7 CVS : http://drupal.org/drupal-4.7-cvs
* CCK : http://drupal.org/project/cck
* Date module : http://drupal.org/project/date
When submitting data with my CCK form, this error is displayed:
Year must be a number between 100 and 3000
warning: implode() [function.implode]: Bad arguments in c:\xammp\...\modules\date\date.inc on line 1143
Does any can confirm this error ?
Am i using the correct releases of Drupal, CCK and Date because I'm a bit confused with the different CVS-releases ?
Comments
Comment #1
karens commentedWhat version of date and cck are you using? You must use the 4.7 versions of everything.
Comment #2
catchI'm using latest 4.7 versions of both modules. Getting the same error.
Have tried various input options. I get the year error even if I don't have year as an input option as well.
On the preview page:
year must be a number between 100 and 3000.
in logs
implode(): Bad arguments. in /home/mysite/public_html/modules/contrib/date/date.inc on line 1143.
Trying to enter something with today's date so definitely between 100 and 3000.
Comment #3
karens commentedMay be related to http://drupal.org/node/86787, maybe something bad in latest commit. I'm trying it in several installations to see if I can reproduce the error and fix it. Just sit tight, hopefully it will be fixed soon...
Comment #4
karens commentedCan you also try the things I suggested in that thread. I feel like you're both probably having the same problem.
Comment #5
karens commentedI think I found the problem. Grab the latest version of date.module and it (hopefully) will be fixed. Reopen if not.
Comment #6
catchalright the new version fixes it if I have
ddmmyyyy granularity.
With:
ddmm - I get the same error.
Also I noticed that filtering as "now" in views, nothing appears even if I've got content entered with that date.
Getting this error now in the view:
array_intersect(): Argument #1 is not an array in /home/mysite/public_html/modules/contrib/date/date.inc on line 1695.
ge in_array(): Wrong datatype for second argument in /home/libcomwww/public_html/modules/contrib/date/date.inc on line 1856.
Comment #7
catchoops forgot to reopen
Comment #8
catchddmmyyyy granularity: 2006-09-30T00:00:00
ddmm granularity: 1970-10-01T00:00:00
Comment #9
catchsorry! long week. ignore last comment.
With ddmmyyyy granularity I get the results posted above in database (both of them).
With ddmm it won't save the node and shows the same error message.
Comment #10
karens commentedThe year is required, so you can't do ddmm granularity and that's why you're getting a message about the year. The reason for that is that my validation has to make some assumptions about whether the user has input something that might really be a date, and the assumption is if there's no year it is not a date. I'm not sure I understand why you would have a day and month but not a year anyway. I've never run into anything like that.
You shouldn't be getting sql or php errors even if you try to omit the year, it should just tell you must have a year, so I'll have to look into why you're seeing errors. I think I need to catch the problem earlier, when the field is set up.
Comment #11
karens commentedAlso, and maybe this is the problem, the granularity just indicates how much of the date will be requested in the forma and stored in the database. You can display just the month and day in views if you want, but there is still a year in there (the current year if nothing else).
Comment #12
catchOK thanks for the help. I do want to omit the year elsewhere in views filtering, will open another issue for that though. Thanks for fixing the other error so fast, pretty much real time!
Comment #13
karens commentedLatest commit adds in some checks to keep you from omitting the year in granularity and adds a note that the year is required.
Comment #14
(not verified) commented