I'm in a weird situation. I have a node. When I see it in the content management section of admin and I click on either its title or its edit link I get "Page not found."

I've tried deleting it this way:

$nid = 44441 ;
$node = node_load($nid);
$result = db_query("delete from {node} where nid = %d", $node->nid) ;
print "result=$result\n";

Result is 1 which should mean success, right? Well, the node is still there.

This snippet of code confirms the node is still there as does going back to the content admin page.

$result = db_query("SELECT nid FROM {node} WHERE type='%s'",$node_type);
while ($row = db_fetch_object($result)){
   print $row->nid . "\n";
}

Any ideas on how to get rid of this "stuck" node?

Thanks.

Comments

scoutbaker’s picture

And what happens if you just check the box next to the content, select "Delete" from the Update options, and then click Delete?

slnm’s picture

I tried that. Drupal says it deleted the record but it's still there when I go back to the content admin page.

slnm’s picture

This worked:

mysql> delete from node where nid = 44441 ;
Query OK, 1 row affected (0.01 sec)
CarbonPig’s picture

I'm having the same issue - how/where did you run this command?

Thanks,

CarbonPig