Issue status update for http://drupal.org/node/18340 Project: Drupal Version: cvs Component: node.module Category: bug reports Priority: normal Assigned to: chx Reported by: chx Updated by: tangent Status: patch Admins may also just edit the initial node instead of deleting it and creating a new one. tangent Previous comments: ------------------------------------------------------------------------ March 3, 2005 - 18:22 : chx Attachment: http://drupal.org/files/issues/default_as_node.patch (8.55 KB) As discussed on IRC, I have moved the welcome text into node 0 as a PHP node. Although there is a check for whether this welcome node is present for every node_page_default call, it is only a variable_get, so it is cheap. Also at every node save we check for the same variable, and if the welcome node is present, it gets silently deleted. So, as soon as the first node gets created, the welcome text disappears as it should. The one liner in node_validate is very important when a node with nid=0 is present. Otherwise, consider it a minor speedup. This patch should have a little positive effect on the memory requirements of node.module -- a long, rarely used text is removed. This is not a new feature but a usability issue so let's get it into 4.6. Although there is change (two INSERTs) to database.mysql and database.pgsql it does not mandate an update.inc change 'cos most probably noone will bother with updating an empty site. I payed special attention to spaces this time. ------------------------------------------------------------------------ March 3, 2005 - 19:10 : chx We discussed this patch with Steven and killes and they do not like the code in node_save. Well, only a variable_get get's executed, so I do not see that as big a problem as it is. If we do not like it, the code can be removed, the wording changed (Steven's suggestion): "This message will guide you through your first steps with Drupal and can be removed through the administrative interface." However, in this case I'd fancy putting a check in node_delete to see whether the nid=0 gets deleted and if it is so, I'd reset the welcome_node_present variable. I'd not like to get rid of that variable, 'cos I think this is a very special page, and deserves the special treatment in node_default_page, and without this variable, I'd need to query the node table if I want the special formatting code to run. Dries, I await your decision. ------------------------------------------------------------------------ March 3, 2005 - 19:47 : Steven I think we should get rid of the special treatment, as it is a lot of hassle for something so simple. We can prevent links from showing up by setting the teaser and body equal (can do this with an extra SQL query in db.sql to avoid repeating the text there), and denying comments. We should also probably put the first sentence "Welcome to your new Drupal-powered website" in the node title and remove it from the body. We could change the theme defaults so stories don't show "submitted by" by default. This does make sense as well if you consider them to be site articles, whereas blogs being the more personal node type. ------------------------------------------------------------------------ March 4, 2005 - 01:13 : Dries +1 on making it a node -1 on using a special variable -1 on modifying node_save() -1 on storing PHP code in the node body I'm OK with this but why the special treatment? Let people manually delete the node when they want to get rid of it.