Help - Search - Members - Calendar
Full Version: Rebuilding error
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
tnoe
I get the following when I try to post or rebuild:

Can't locate object method "new" via package "DateTime" at lib/MT/Template/Context.pm line 1429.

Anyone have a clue?
shelley
Was extlib/DateTime.pm uploaded to your server, and in ASCII mode?
tnoe
QUOTE (shelley @ Oct 10 2004, 12:30 AM)
Was extlib/DateTime.pm uploaded to your server, and in ASCII mode?

Yes, it just started too.
tnoe
Well I narrowed it down to the Atom template. If I turn it off, everything rebuilds fine. I'm using the default Atom template.
johnengler
yes, it's the atom template... the default atom template has something wrong with it, for me too. I disabled it, then tried rebuilding it all on its own, and it wouldn't rebuild...
TweezerMan
There is nothing wrong with the Atom template. In the Atom template, certain date/times need to be provided in UTC time to comply with the Atom feed specification. Special code was added to MT's date handling code to do this, which is called by using the utc="1" attribute in an MT date tag. As far as I know, only the default Atom template has date tags containing the utc="1" attribute, which is why this issue only occurs with that template.

The code that MT runs when evaluating an MT date tag with the utc="1" in it requires that the DateTime perl module be installed. The error message Can't locate object method "new" via package "DateTime" at lib/MT/Template/Context.pm line 1429. is an indication that something is wrong with DateTime perl module - it is not installed, not installed correctly, or not completely installed.

I'd suggest checking and making sure that all of the following files were installed from the MT distribution, installed to the correct directory, and that they were uploaded in ASCII mode:
CODE
/extlib/DateTime.pm
/extlib/DateTimePP.pm
/extlib/DateTimePPExtra.pm
/extlib/DateTime directory - 7 files
/extlib/DateTime/Locale directory - 2 files
/extlib/DateTime/Locale/Alias directory - 1 file
/extlib/DateTime/TimeZone directory - 5 files
/extlib/Params directory - 3 files
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.