The problem is, when try to delete a content page, ajax timed out after 30 secs and report an error. After tracing the delete routine, I found that in lib/classes/class.contentoperations.inc.php line 440 a block of code may be incorrect, listed below:
426 while ($current_parent_id > -1)
427 {
428 $query = "SELECT item_order, parent_id, content_alias FROM ".cms_db_prefix()."content WHERE content_id = ?";
429 $row = &$db->GetRow($query, array($current_parent_id));
430 if ($row)
431 {
432 $current_hierarchy_position = str_pad($row['item_order'], 5, '0', STR_PAD_LEFT) . "." . $current_hierarchy_positi on;
433 $current_id_hierarchy_position = $current_parent_id . '.' . $current_id_hierarchy_position;
434 $current_hierarchy_path = $row['content_alias'] . '/' . $current_hierarchy_path;
435 $current_parent_id = $row['parent_id'];
436 $count++;
437 }
438 else
439 {
440 $current_parent_id = 0;
441 }
442 }
notice the line in red, when no rows retrieved, $current_parent_id is set to 0, and the whole loop may going forever since $current_parent_id will never be less than -1. After changing line 440 to $current_parent_id = -1; , the problem is solved.
Is this a bug? Hope cmsms developers have a look at this.
and thank you for making such a great system, both coding and theme are beautiful
