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.
I have a pretty fresh installation of drupal, and everything works. I only get this error when I attempt to add new content, like a blank page or article. It tosses:
Fatal error: Call to a member function getName() on a non-object in /home/websites/my/sites/all/modules/date/date_api/date_api.module on line 181
But then when I refresh, I get this message:
Warning: DateTime::getTimezone(): The DateTime object has not been correctly initialized by its constructor in DateObject->__construct() (line 283 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::setTimezone(): The DateTime object has not been correctly initialized by its constructor in DateObject->setTimezone() (line 358 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::setDate(): The DateTime object has not been correctly initialized by its constructor in DateObject->setTimezone() (line 359 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::setTime(): The DateTime object has not been correctly initialized by its constructor in DateObject->setTimezone() (line 360 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::getTimezone(): The DateTime object has not been correctly initialized by its constructor in DateObject->__construct() (line 283 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::setTimezone(): The DateTime object has not been correctly initialized by its constructor in DateObject->setTimezone() (line 358 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::setDate(): The DateTime object has not been correctly initialized by its constructor in DateObject->setTimezone() (line 359 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::setTime(): The DateTime object has not been correctly initialized by its constructor in DateObject->setTimezone() (line 360 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::setTimezone(): The DateTime object has not been correctly initialized by its constructor in DateObject->setTimezone() (line 358 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::setDate(): The DateTime object has not been correctly initialized by its constructor in DateObject->setTimezone() (line 359 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::setTime(): The DateTime object has not been correctly initialized by its constructor in DateObject->setTimezone() (line 360 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::setTimezone(): The DateTime object has not been correctly initialized by its constructor in DateObject->setTimezone() (line 358 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::setDate(): The DateTime object has not been correctly initialized by its constructor in DateObject->setTimezone() (line 359 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::setTime(): The DateTime object has not been correctly initialized by its constructor in DateObject->setTimezone() (line 360 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 384 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::getTimezone(): The DateTime object has not been correctly initialized by its constructor in DateObject->__toString() (line 181 of /home/websites/my/sites/all/modules/date/date_api/date_api.module).
Comments
Comment #1
vijaycs85Thanks for reporting @kite552. Can you please provide some more details to reproduce this issue please? also exact drupal & module versions would help.
Comment #2
kite552 CreditAttribution: kite552 commentedThe latest version of drupal, mainly core modules other than the d4os module the latest version with its events system which is the only thing that integrates with the date_api
Comment #3
ssm2017 Binder CreditAttribution: ssm2017 Binder commentedhello
@kite552
have you tried with the -dev version of date module and the d4os module ?
@vijaycs85
in the d4os module, im trying to get a date as a timestamp
here is how im doing :
http://drupalcode.org/project/d4os.git/blob/refs/heads/7.x-1.x:/ui/searc...
and then
http://drupalcode.org/project/d4os.git/blob/refs/heads/7.x-1.x:/ui/searc...
maybe there is a better way to convert a date to a timestamp but i was not able to find it
Comment #4
steinmb CreditAttribution: steinmb as a volunteer commented