Hey Karen and company,
I just installed the awesome Date module (6.x-2.1) and created my first date CCK field (CCK-6.x-2.2). When I save a node that has the date field, I'm getting the following error/warning message:
* warning: date_timezone_set() expects parameter 1 to be DateTime, null given in /home/bknew/public_html/sites/all/modules/date/date_api_ical.inc on line 568.
* warning: date_format() expects parameter 1 to be DateTime, null given in /home/bknew/public_html/sites/all/modules/date/date_api_ical.inc on line 654.
* warning: date_timezone_set() expects parameter 1 to be DateTime, null given in /home/bknew/public_html/sites/all/modules/date/date_api_ical.inc on line 568.
* warning: date_format() expects parameter 1 to be DateTime, null given in /home/bknew/public_html/sites/all/modules/date/date_api_ical.inc on line 654.
Any ideas on what could be the problem? I'm using a Drupal 6.10 install....
Thanks a million,
Ben
Comment | File | Size | Author |
---|---|---|---|
#6 | Edit view calendar-working-2.png | 605.06 KB | kepford |
#6 | Edit view calendar-working.png | 504.24 KB | kepford |
Comments
Comment #1
arlinsandbulte CreditAttribution: arlinsandbulte commentedDuplicate of #409476: date_timezone_set() & date_format() error when editing CCK date repeating fields.
I think this has been fixed in the latest 6.x-2.2 release.
Comment #2
tlangston CreditAttribution: tlangston commentedNot fixed. I've installed the latest version and am still hitting this error. Note the module referenced in the string is Calendar. Is this related?
* warning: date_format() expects parameter 1 to be DateTime, null given in /var/www/vhosts/theatricalsinger.com/httpdocs/sites/all/modules/calendar/includes/calendar.inc on line 416.
* warning: date_format() expects parameter 1 to be DateTime, null given in /var/www/vhosts/theatricalsinger.com/httpdocs/sites/all/modules/calendar/includes/calendar.inc on line 416.
Comment #3
sparker888 CreditAttribution: sparker888 commentedSame problem here. I'm getting these errors with the latest module releases:
* warning: date_timezone_set() expects parameter 1 to be DateTime, null given in C:\wamp\www\acquia-drupal-1.2.9\modules\acquia\calendar\includes\calendar.inc on line 414.
* warning: date_format() expects parameter 1 to be DateTime, null given in C:\wamp\www\acquia-drupal-1.2.9\modules\acquia\calendar\includes\calendar.inc on line 416.
Subscribing
Comment #4
laken CreditAttribution: laken commentedConfirmed still a problem in 6.x-2.2 - I'm getting the identical error to #2 and #3 in a fresh install of Acquia Drupal 1.2.11
Date 6.x-2.2
Calendar 6.x-2.1
CCK 6.x-2.4
Views 6.x-2.6
We're seeing this regardless of whether user is logged in or not.
Comment #5
kepford CreditAttribution: kepford commentedI am getting this error as well. The error only appears on Calendar pages where a node is listed in the view.
* warning: date_timezone_set() expects parameter 1 to be DateTime, null given in /Applications/MAMP/htdocs/citd/sites/all/modules/calendar/includes/calendar.inc on line 414.
* warning: date_format() expects parameter 1 to be DateTime, null given in /Applications/MAMP/htdocs/citd/sites/all/modules/calendar/includes/calendar.inc on line 416.
Drupal 6.12
Date 6.x-2.2
Calendar 6.x-2.1
CCK 6.x-2.2
Views 6.x-2.6
Seeing it for both anonymous users and authenticated users as well
Comment #6
kepford CreditAttribution: kepford commentedI was able to get rid of the error by adding the date field that is in the argument and then excluding it from display. Not sure why this worked but thought I would post it. Hope this helps someone.
So my argument date was a CCK date/time from field. I only wanted to display the node title in the calendar view. This threw the error. When I added the date/time field to the fields the error went away.
Comment #7
nicholas.suter CreditAttribution: nicholas.suter commentedHello people,
I've been trying to work around this issue too (as a user, not a developer). My configuration :
- CCK 6.x-2.4
- Views 6.x-2.6
- Calendar 6.x-2.1
- Date 6.x-2.2
- Drupal 6.13
I get this error when displaying a calendar block, calendar page or a node based on my content type created with the Date Tools. This error appears with all users except Admin (user #1), and happens when my principal date has an end date.
I tried deleting a recreating my date content type, using only dated without hours and minutes and deactivating all timezone options.
When I modify my principle date so it doesn't have an end date, there is no error, but my date is never displayed (but the body of the node is) unless I log in as Admin.
EDIT : problem solved my end... by simply deactivating CCK content permissions module. My users probably didn't have the necessary rights for something or another (something with time fuses ?)
Comment #8
Alan D. CreditAttribution: Alan D. commentedThanks bobkepford.
Yep, looks like a dependency of the date field to be in the views field list. See #6: http://drupal.org/node/463052#comment-1728502
Comment #9
swellbow CreditAttribution: swellbow commentedThis may not help anyone, but I was getting the same four errors when submitting new data for a content type using a date field -- for anonymous users. I reduced it to a new content type with only title and the one date field and still got the error. On a hunch while studying the stack, seeing that Mollom was in the stack, I changed Mollom settings for that form to CAPTCHA only (instead of CAPTCHA and text analysis) and the problem went away. I think Mollom is trying to format the date for analysis and for some reason something gets mixed up. The stack was quite tall and a bit beyond my ability to deduce, but I would be happy to copy the stack here if it helps.
Comment #10
caschbre CreditAttribution: caschbre commentedDitto on my end here. I also disabled the CCK content permissions module to get around the issue.
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks, swellbow, setting the form to 'CAPTCHA only' fixed it for me. Reassigning this issue to the Mollom project, let's see what they say.
Comment #12
Dave ReidI'll look into this on the Mollom end. Can someone show me the exact steps I would need to reproduce this?
Comment #13
caschbre CreditAttribution: caschbre commentedI'm not using Mollum so I'm not sure I'd say it is an issue with that project.
Comment #14
Anonymous (not verified) CreditAttribution: Anonymous commentedcaschbre, please send it back into the CCK/Date issue queue if you are getting the warning without Mollom. Since the warnings on my site are definitely caused by Mollom, I opened a new issue at #526024: date_format() warning on line 356.
Comment #15
caschbre CreditAttribution: caschbre commentedreassigning back to date. I think I did it right.
Comment #16
doknet CreditAttribution: doknet commentedjust leave a relase will fix this problem calendar.2.2
Comment #17
arlinsandbulte CreditAttribution: arlinsandbulte commentedI *think* this is now fixed with the latest date/calendar modules as of 9/15/09.
Can someone confirm?
Comment #18
kate CreditAttribution: kate commentedI was using the latest development versions of date and calendar and I saw these errors when an authenticated user tried to create a new content type that had a datetime field.
Following the instructions in #9 from swellbow (thanks swellbow!!!) fixed this for me. I just changed my mollom setting for that form to captcha only and now I don't see any error messages.
Comment #19
arlinsandbulte CreditAttribution: arlinsandbulte commentedI am going to mark this as fixed for now.
I renamed the title back so it can be found more easily if someone else happens to run into this problem again.
I know there is at least one other issue with the same or similar error... (some_function expects parameter 1 to be DateTime)
They are probably all related.