The only natural situation I can imagine the first database error occurring is if you delete the namespace's forum first from the forum manager, then delete the namespace afterward. There are probably other situations, like if the datastore cache hasn't updated for some reason, but that's all I can think of for now.
Perhaps locking down the cause would help. Why did you delete the namespace?
Other possibilities: Was the namespace's forum a child of a different namespace's forum? This option is allowed but hasn't been tested extensively.
To prevent the database errors should the datastore be outdated again during the delete action. In
vault/dm/namespace.php, find:
Code:
$children .= ',' . implode(',', $childlist);
$this->rebuild['meta'] = array(
array(1, 0),
array($thisnamespace['forumid'], $thisnamespace['forumid']) // not used in this case
);
Replace with:
Code:
if ($childlist)
{
$children .= ',' . implode(',', $childlist);
$this->rebuild['meta'] = array(
array(1, 0),
array($thisnamespace['forumid'], $thisnamespace['forumid']) // not used in this case
);
}
Any case that causes this would probably leave orphan data in the database, but now there will not be an error. Not really possible to fix completely until we do the database rewrite for 3.1.0.