Page 1 of 1

"System Maintenence" not loading after upgrade to 1.11.4

Posted: Tue Jan 22, 2013 1:05 am
by jomoweb
I've upgraded a few sites to 1.11.4 now, and have noticed a common problem. When I try to access system maintenance in the admin, the page will not load. I usually get a time-out or a server error that says:

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

This is the error generated in my php error log:

PHP Fatal error: Call to a member function FetchRow() on a non-object in /path/to/site/admin/systemmaintenance.php on line 246

This is the snippet of code starting at line 246:
while ($contentpiece = $allcontent->FetchRow()) {
$pages[] = $contentpiece["content_name"];
if (trim($contentpiece["content_alias"]) == "" && $contentpiece['type'] != 'separator') {
$withoutalias[] = $contentpiece;
}
if (!in_array($contentpiece["type"], $simpletypes)) {
$invalidtypes[] = $contentpiece;
}
//print_r($contentpiece);
}

Re: "System Maintenence" not loading after upgrade to 1.11.4

Posted: Tue Jan 22, 2013 1:48 am
by calguy1000
if that expression fails you have more serious problems.... like 'no content pages', or a serious database integrity problem.

if you have no content pages, create at least one.
if you have one or more content pages, do a database repair, or a restore from backup.

Re: "System Maintenence" not loading after upgrade to 1.11.4

Posted: Fri Jan 25, 2013 9:11 pm
by jomoweb
Thanks for the tips, but I am still struggling. This has happened with several sites now that i have gone back and double checked. New sites are fine, but various sites I have upgraded won't load the system maint tab.

It is definitely not 'no content' pages. There are plenty of those.

I got hollered at by my webhost for running a check table query on all tables. Apparently they don't like that because it bogs down the server resources. When I try to access the tab on various sites, I often just get a connection timeout. That makes me wonder if this CHECK query is taking too long. I do not know what would have happened to make each database messed up during the upgrades. I followed the standard procedures each time.

I found this block of code in the system main file and commented it out. The tab loads now, but something does seem wrong on the database, b/c one time I got the tab to load on a fluke try, and it told me there were 196 Structural errors detected in tables: (list of a bunch tables here)

/*

$query = "CHECK TABLE " . MakeCommaList($tables);
//echo $query;
$checkarray = $db->GetArray($query);
//print_r($checkarray);

$errortables = array();
foreach ($checkarray as $check) {
if (isset($check["Msg_text"]) && $check["Msg_text"] != "OK") {
$errortables[] = $check["Table"];
}
}

$smarty->assign("errorcount", count($errortables));
if (count($errortables) > 0) {
$smarty->assign("errortables", implode(",", $errortables));
}

*/

Re: "System Maintenence" not loading after upgrade to 1.11.4

Posted: Fri Jan 25, 2013 10:17 pm
by jomoweb
One other thing, I am trying to repair tables one by one in my DB admin, and some tables says I think that relates to InnoDB tables. "The storage engine for the table doesn't support repair"

The MyISAM tables seem fine for repairing.

Re: "System Maintenence" not loading after upgrade to 1.11.4

Posted: Fri Jan 25, 2013 10:29 pm
by jomoweb
Last thing to add, when I open some of the tables the system said had structural errors (for instance, content_seq), a little error appears that says: "No index defined!"

Is this normal.

Re: "System Maintenence" not loading after upgrade to 1.11.4

Posted: Sat Jan 26, 2013 2:50 pm
by SpringSummer
jomoweb wrote:A little error appears that says: "No index defined!"

Is this normal.
It is normal. Some tables do not have an index.