This problems appears to have been around for a long, long time. Dating back to 2005...but it seems to have never been resolved. Many topics have been created for it in the past...I'll leave just 1 link, but there's plenty of duplicates of it over the years: http://drupal.org/node/53348

The problem is that when a User is deleted, all the content which was associated with it is essentially lost as the UID is set to 0. The real problem here is that it breaks tons of modules, including mainstream ones like Views.

For example.
I create a regular user account and login. I create a node. That node is displayed on a very simple View where Node:Published is set to TRUE. I login to my Admin account, I delete the user account that I just created the node with. I go check out the View. Where that node would have been displayed before, it is now displaying "n/a" highlighted in pink (like an unpublished node). Likewise, that node is no longer accessible, even to me, as an Admin. Eg. Going to /node/31/edit will not work...page not found.

There's a few problems with this:

  • First, that node should still be accessible if it wasn't deleted (it wasn't, supposedly it's set to user 'anonymous' according to the warning before deleting a user...according to the NODE table, the UID is now 0).
  • Why is the Views showing "n/a" in pink (as if it were unpublished) when the View is set to only display Published nodes? Regardless of the publishing state, why is it showing "n/a" instead of the node when the node still exists...and if it shouldn't be showing, why is showing anything at all? Seemly, it is not actually set to unpublished or published...but rather some strange error is occurring.
  • I am to assume there are numerous other problems occurring because of the state these nodes are left in after the user is deleted
  • Solution?
    Something that certainly needs discussion given the number possible solution routes.

    I think the most important part at the moment is to make sure things aren't left in such a crippled state. There is no use in a Delete user option if you are going to cripple sites by having such. Likewise though, I strongly believe there is a need to allow for cleanly deleting users and possibly even allow users to delete themselves. It's a major rights / privacy issue. At the very least, a way to remove personally identifiable information (name, email, etc) from the account.

Comments

blue.moon’s picture

Yes I Figured out the same problem, But when I watch the node structure and Data, It tricks me out that node author is anonymous means 0..

I think the solution of that bug should be simple when you delete an account

  • Author Primary information should keep i.e. Created, Email, Username. etc (if author's secondary data would delete no matters i.e. Profile's Modules Extended Fields Such as Firstname Lastname.).
  • When anyone will see these kind of node show a message there "Author of this node has been deleted", and this node should be disable for any kind of alteration or update.
  • Only Admin should have right to delete this.
  • Views Module should have an option to show nodes from deleted users.

I don't think my solutions are very good but better than current API.

Blue Moon

brisbanett’s picture

I hope super hope someone finds a solution because this pink n/a is really unprofessional looking.
I wish I could programme but its not my area...

I do know this. this problem happened when I wrote some comments and was not signed in. At that time I think (no sure) I had permission granted to anonymous users to post a comment - so i wanted to test it.

what i found was i could post and then wala nothing to see that i had posted except a pink line and an error message. which I have gotten rid of by altering code suggested on this forum ... sorry slipped my mind but it was something like line 1284 else if fields...

what I have found also now and this may be a totally other bug - when I click on my logo on home page title - I get signed out.

not sure if there is something to do with permissions views .... this all from a newbie hoping this is important enough to get fixed soon...

help

dpearcefl’s picture

Status: Active » Closed (won't fix)

Considering the lack of activity on this issue and that Drupal v5 is no longer supported by fixes or patches, I am going to close this ticket.