I get this message every time I try to log in to my MT account at the back end:
An error occurred
Can't call method "created_on" on an undefined value
The only option I get at this point is a "Go Back" button, which brings me back to the login page.
How do I fix this?
Reported on Movable Type 4.3

David:
The problem may be the result of something odd like an entry, comment, or trackback that's part of your blog not having a valid timestamp in the created_on column. If we were providing support to you, we would initially troubleshoot this by looking directly at the database and seeing if there are rows in the corresponding database tables with data missing in those columns.
--Dave Aiello
Dave:
Thanks for your response.
Although I can't claim to have done a comprehensive look, I did do a fairly thorough look and did not find anything unusual in the tables you mentioned.
Any suggestions?
Dave:
Thanks for your response.
Although I can't claim to have done a comprehensive look, I did do a fairly thorough look and did not find anything unusual in the tables you mentioned.
Any suggestions?
David:
My next step would probably be to turn debug mode on (temporarily by placing DebugMode 1 in mt-config.cgi) and get more information about the error than is normally displayed by Movable Type. For more information see http://www.movabletype.org/documentation/developer/plugins/debug-mode.html.
This would give you additional information in the error message that might be useful to someone who has some familiarity with the Movable Type codebase.
--Dave Aiello
Another usual suspect in these kind of sudden errors is a newly added plugin. Try to check if you have added a new one recently and move it outside your plugins folder, then check again.
David:
Not to beat a dead horse here, but temporarily turning on the DebugMode may also help clarify things if François' idea was the root cause of your problem.
--Dave Aiello
Yes, Debug Mode does help :)
Well, I did try out the debug mode. Evidently one of the plugins was causing some errors, but not the root of the problem. In debug mode, the error now reads:
David:
Line 10576 of lib/MT/Template/ContextHandlers.pm of the Movable Type 4.3x branch is part of the comment handler (i.e. it's a line of Perl in sub _hdlr_comments).
Did this just start happening recently?
When you say that you didn't find anything unusual in the tables, could you look closely to see if there are any rows in mt_comment where comment_created_on is either NULL or some value that wouldn't appear to be a valid datetime?
Thanks,
--Dave Aiello
I had also observed that it was probably comment related, so I started going through all the comments. I did find a great deal of spam, but as I mentioned earlier, nothing unusual in the comment_created_on table.
I even cleared out most of the comments (which were junk), and whittled it down to about 5, none of which broke my site before.
I started experiencing this problem in late December. One day I tried to log in and noticed that I couldn't log in as I normally would have been able.
Any thoughts?
The problem may be the result of something odd like an entry, comment, or trackback that's part of your blog not having a valid timestamp in the created_on column.
midias sociais