Help - Search - Members - Calendar
Full Version: Error on rebuild
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
Teel
Note:  I am still able to post entries in other blogs with no problem.  There is just one blog not accepting the entry.
Teel
I've tried changing the hour, minute, day, month, and year in various combinations, and I get the same error every time.  I've tried rebuilding with the rebuild button and get a truncated version of the same error.  I've tried adding another entry (in addition to the first one that wouldn't post), and got the same error on that one.

I'm going to go look closely at the templates for that blog and see if I can find a problem there.
Teel
Okay, I found the problem.  One of my users posted an entry while we were in v1.41 with 1742 as the year.  I guess v1.41 didn't have a problem with such a date.  Now I can't access that entry at all.  I can't even get the List & Edit entries window to show a screen with that entry; it gives that error again.  

Any idea of how to delete/modify that entry to get the invalid date out of it?
Teel
That worked.  I was able to change the date on the problem entry and then un-comment those lines.  

I would like to put in a request that invalid dates be blocked int he future, or if you have the resources, something found/written to handle them.

It's times like this that I think I should learn Perl, so I could try to assist with this.
Teel
I tried to add a post and got the following error:

Your post was saved, but the rebuild or ping failed: Can't handle date (48, 58, 15, 29, 7, -158) at lib/MT/Util.pm line 30

I had not tried to change the date of the post.  It has "2002-03-23 14:54:24" in the date field of the saved (but not posted) entry.
kadyellebee
Nothing looks weird about that date - I wonder what would happen if you make a slight change in it (like to the hour or minute).  

That might be enough for it to get over the hump and fix itself, although I really don't know what it would be hiccupping on that!!

Kristine
Mescad
This is the same error I was getting when I was entering invalid dates (pre 1970 or post 2038.)

The -158 is the year part, and AFAICT shouldn't be a negative number.  I'm not really sure, but that may help you figure out the problem and solution.
btrott
You could comment out the line 30 in lib/MT/Util.pm and perhaps surrounding lines. That will at least skip the step that is killing the script.
btrott
Yes, the invalid date thing has always been a bit of a problem. Handling it more nicely is on the todo list.
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.