[FIXED OK]: Suddenly can't edit any pages!
Posted: Sun Jun 11, 2006 10:37 am
All of a sudden, the "main/content/pages" menu does not display any pages, so I can't edit my site! The site is still working, thankfully...
This came after just clicking on the expand/collapse button. This is using CMSMS 0.13 with PostgreSQL 8.1.4, PHP 4.4.2, FreeeBSD 6.1, mathopd 1.5p5. The PHP error log says:
[11-Jun-2006 11:22:34] PHP Fatal error: Call to a member function on a non-object in /home/website/lib/classes/class.content.inc.php on line 2139
Lline 2139 is the 'while' at the bottom of this chunk:
Any thoughts how to recover?
This came after just clicking on the expand/collapse button. This is using CMSMS 0.13 with PostgreSQL 8.1.4, PHP 4.4.2, FreeeBSD 6.1, mathopd 1.5p5. The PHP error log says:
[11-Jun-2006 11:22:34] PHP Fatal error: Call to a member function on a non-object in /home/website/lib/classes/class.content.inc.php on line 2139
Lline 2139 is the 'while' at the bottom of this chunk:
Code: Select all
$query = "SELECT * FROM ".cms_db_prefix()."content $expanded
ORDER BY hierarchy";
$dbresult =& $db->Execute($query);
if ($dbresult && $dbresult->RecordCount() > 0)
{
while ($row = $dbresult->FetchRow())
{
#Make sure the type exists. If so, instantiate and load
if (in_array($row['type'],
array_keys(@ContentManager::ListContentTypes())))
{
$contentobj = &new $row['type'];
$contentobj->LoadFromData($row, $loadprops);
if (isset($childrenCount[$contentobj->Id()])) {
$contentobj->mChildCount = $childrenCount[$contentobj->Id()];
}
$curlevel = substr_count($contentobj->Hierarchy(),".")+1;
if ($curlevel>$level) { // going farther in hierarchy
$level = $curlevel;
$node = &new ContentNode();
$node->init($contentobj,$currentNode);
$currentNode->addChild($node);
$next = &$node;
} else if ($curlevel<$level) { // going upper
while ($currentNode->getLevel()!=$curlevel) {
$currentNode = &$currentNode->getParentNode();
}