This is another RFC. Any and all feedback is encouraged.

Currently Node Heaven is very separate from the rest of the database. There is no way for people to access their old nodes, and to see old versions of writeups currently. Versioning is a problem that faces e2 in a small way; people can't really refresh/backup/version their writeups without the intervention of a God. One really good way would be to use Node Heaven as not only a place where people can reflect on how they've messed up, but also as a place where they can version control their docs.

First off, my current idea would require a change the heaven dbtable. This would be really minor, and it would be to add a secondary index to contain the old_parent_id of a writeup. It would contain the id, so that it can be looked up whenever a node is visited. This would also require a small change to write down the parent_id when something gets whacked, but that seems rather reasonable. I can't find the code that removes the node, but I know this is some kind of job or something that is scheduled to trigger at night.

We could also back index the current selection of database rows, so that the table is healthy, alive, and ready to go. (if they don't exist anymore, they will be lost children, oh well.)

Once we have an index of the parent_ids of all of the current Heaven inhabitents, we then can modify the way the pages are displayed so that users can see when they have had previous versions of a writeup in play. This will allow them to see that they have in fact had something there previously.

In addwriteup, we could add stuff around line 17 to something like the following:

# Do something here so that we don't have old versions mentioned in E2 Nuke Request, and the like.
my $qNH = $DB->sqlSelectMany('*', 'heaven', 'type_nodetype='.getID(getType('writeup')).' AND author_user='.getID($USER), 'order by createtime');

my $outStr = '<br><b>You have had previous versions of this node that now rest in'.linkNode(getNode('node heaven', 'superdoc'), 'Node Heaven').': ';

my $NHv = getNode('Node Heaven Visitation', 'superdoc');
while(my $N = $qNHr->fetchrow_hashref) 
  return if int($N) == -1;
  outStr .= linkNode($NHv, $n{node_id}, {visit_id => $$N{node_id}}).', ';
outStr .= '</b><br>';

Basically it would look like:

*end of node*
You have had previous versions of this node that now rest in Node Heaven: 12348, 993456

Why I feel this is a good thing for the database, even though it might cost a little more to check for things inside of Node Heaven :
  • New users ask a lot of questions, especially after they lose something they thought was funny, or were glad that no one had beat them to a teacher in their high school. A user can go to check up on his or her node, and find out that there was something missing.
  • This would allow for a sort of versioning of writeups, for people who want to start from scratch.
  • Node heaven would be more highly integrated into E2, the way Everything User Search, and other critical docs are.
It shouldn't be totally expensive, because we are making a lookup to a fairly uncommon id (unless the user has tried forty or fifty times.. to get it right on some node).

Another suggestion for the heaven dbtable would be to include the reason that Klaproth gives , so that people who ignore the message can still get the reason. (Maybe people are afraid of messages). It would require storing some text in the db, but it may be worth it... Thoughts?

Log in or registerto write something here or to contact authors.