Help - Search - Members - Calendar
Full Version: Rebuild problem + entries not appearing correctly
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
greenstork
On Sunday night I posted two entries right before going to bed. One I published Sunday night and forward dated to Monday and the other I left in draft status and forward dated it to Tuesday. I didn't even check to see if it posted because it always has and I did double check my entry and code.

When I looked again in MT (for the first time) on Tuesday, I did not see my Monday entry nor did I see my draft entry for Tuesday. I was tired when I posted on Sunday so I actually thought I just spaced and didn't post anything. Today I tried to post a new entry and I got this message when attempting to rebuild:

CODE
ERROR: Can't use an undefined value as a SCALAR reference at /home/esw/cgi-bin/lib/MT/ObjectDriver/DBM.pm line 173.


I've had no luck at all and I feel like whatever this problem is, is related to the entries I posted on Sunday night because I never saw them in the MT entry list when I looked on Tuesday. Oddly enough however, my Monday post was published on the site but not in MT or presumably, not in the Berkley DB I am using.

I have MT version 2.63.

I have tried deleting a few posts and re-posting and I get the same rebuild error.

Any help is appreciated.

Thanks,
Dave

UPDATE: In the interest of timeliness, I have asked my ISP/web host to revert to a backup of all of my files dated back to Saturday. However, I'd still like to know if there is a cure for this error message.
TweezerMan
SCALAR errors are usually an indication of database corruption. Restoring a known good backup is probably the best thing you could do in this situation.
greenstork
I asked my ISP to restore a working backup and they restored as of last Saturday. I posted one new entry then bam, all my entries disappeared from the MT main menu. Ironically, the number of posts in each blog still appeared but when I clicked on the weblog to access that blog's main menu, there were no "past 5 entries" listed and when I click edit entries, it turns up with no entries listed.

Also thinking that this was an isolated incident, I re-phoned my ISP and talked to the sysadmin. He proceeded to restore a backup from last Thursday.

This also worked at first, but after posting two new entries, the third entry post gave me a "load failed" error and when I went to access the blog menu, once again, all of the entries had disappeared.

At first I was mildly concerned about this problem, thinking that a working backup would do the trick. Now, I'm quite worried. Can anyone tell me my options for:

1) restoring another backup from last Thursday and fixing MT before the said corruption occurs OR

2) Restoring a backup from last Thursday, exporting all data and completely reinstalling MT. I've never exported entries, is it easy? Are category names retained? Are post dates and other meta data retained? Would the corruption to the DB also get exported and potentially affect a new install?

I'd prefer not to opt for paid support as our organization is a non-profit on a tight budget. Is that my only option? Does Six Apart even offer that? Any help is appreciated, even if it's just sound advice because this is all beyond the realm of my knowledge.
TweezerMan
QUOTE
Can anyone tell me my options for:

1) restoring another backup from last Thursday and fixing MT before the said corruption occurs OR

MT (the application) isn't the problem - it's your database files. There are tools that allow someone who knows what they're doing to attempt to repair a Berkeley DB, but from what I've read, they're command line tools, and most users have neither the access nor the expertise to use them. Your host *might* have the necessary knowledge and expertise, but that's a pretty big "if". (They'd also have to want to put in the time to try to repair your database, and they may decide it's not worth the time/money - restoring a database backup may be the most they're willing to do.)

QUOTE
2) Restoring a backup from last Thursday, exporting all data and completely reinstalling MT. I've never exported entries, is it easy? Are category names retained? Are post dates and other meta data retained? Would the corruption to the DB also get exported and potentially affect a new install?

Exporting your entries is pretty easy. Whether you will be able to get a complete and successful export depends on how corrupted your database is.

Category names are retained in an export, as well as post dates, titles, comments, and trackbacks. To see a full list of what an export contains, take a look at MT's Import File Format - the same info/data/fields are exported.

What's *not* included in an export is your templates and your Weblog Config options. If you've done a lot of customization of your templates, you'll want to try to get a copy of those as well before deleting your database and starting over.

I don't know if the database corruption would make it into an export; as I noted above, I think it is more likely that database corruption would prevent you from exporting some or all of your entries.

QUOTE
Any help is appreciated, even if it's just sound advice because this is all beyond the realm of my knowledge.

1) After you restore a database backup, don't do anything that writes to the database, such as posting entries. Your database is corrupted enough that writing new data into the database is corrupting it more. Think "Look but don't touch". wink.gif

2) If it is available on your host, now would be a great time to migrate your database to MySQL. MySQL is faster, more robust, usually has better tools to manage your database, and is much less prone to corruption. (Not to mention that you'd be able to use plugins that require MySQL.)

Hope this helps...
greenstork
Okay, I exported all of my entries, deleted the entire database folder and cgi-bin where MT files were stored. I downloaded a whole new version of MT and reinstalled it. I updated 3 of the 5 blogs that I had running my website. Re-tweaked all of the settings and recreated my templates.

When I just went to post a new entry in one of my blogs, I got a "load failure" and just like before, all of my entries are missing from the MT system, although on the main menu I can see that there are 138 entries in one blog, 103 in another, etc. When I click to access the blog however, there are no "last 5 entries" and no entries on the edit entries list.

I reinstalled, I really just don't know what else to do. I setup a new database file in a new location. I was told by at least two people that it is next to impossible to corrupt a database by importing entries. I'm beginning to think the problem lies elsewhere.

I am seriously regretting spending the whole day on this, does anyone know what I should do?

Thanks,
Dave
eblaustein
Dave,

Have you recently installed any plugins or hacks since the beginning of this issue?

I'm wondering because I had a similar problem and was able to fix it. When I implemented the Entry Field hack, I forgot to initialize my new field in the Entry.pm file and the result was exactly as you describe: entries listed but not showing up in the Edit Entries window.

The fix only entailed adding the field name to the Entry.pm file, and voila all the files reappeared.

Good luck.
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.