Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting a user does not delete all annotations owned by that user (Trac #957) #957

Closed
elgg-gitbot opened this issue Feb 16, 2013 · 8 comments

Comments

@elgg-gitbot
Copy link

Original ticket http://trac.elgg.org/ticket/957 on 39264867-08-08 by trac user kevinjardine, assigned to unknown.

Elgg version: 1.5

One side effect is that forum discussions return blank pages if the deleted user had commented on a forum topic.

@elgg-gitbot
Copy link
Author

trac user marcus wrote on 39270196-07-15

Hmm... user delete does call delete annotations. It could be possible that this is falling foul of the ACL although I'm not entirely sure why since anyone who can delete the user should be able to remove the entity.

I will modify the garbage collector to tidy up annotations owned by non-existant users - this should tidy up instances where this has already happened.

I will also look at putting in some belts and braces checking to surpress annotations from inaccessible owners.

Any chance you could have a look to confirm the cause of this issue if you get a moment unless I get to it first..?

@elgg-gitbot
Copy link
Author

trac user marcus wrote on 39270258-11-03

Actually, having reread this report and the code, we don't remove comments from deleted owners.

We actually want would want to keep annotations from a deleted user - comments for example - so removing annotations may not be an entirely good idea... that said we do recursively remove owned entities if the flag is set. I still view this as different from a UX pov.

Moving annotations and metadata which have been written to deleted entities is fairly uncontencious and checks for this should go in.

Preventing WSoD for comments or discussions left by deleted users (can't replicate the example given in latest code) should be down to good coding practice and validating entities before calling a method call on them. As discussed with other issues (eg #640) this is impossible for the framework to trap.

Because I am unable to replicate the WSoD on latest SVN I am downgrading this issue.

@elgg-gitbot
Copy link
Author

davetosh wrote on 39306445-04-26

This issue needs to be upgraded. As can been seen on this site: http://www.stxsoccer.com/elgg/pg/groups/world/ selecting 'latest discussion' causes the site to white screen due to content being left over from a deleted user.

@elgg-gitbot
Copy link
Author

trac user marcus wrote on 39306553-04-13

I have managed to replicate this fault, and it is due to calls in getforumtopic.php not checking whether the owner entity exists before calling methods on it.

I do not believe that removing annotations made by deleted owners is particularly safe in all contexts, so I will modify this view to correctly handle deleted users.

@elgg-gitbot
Copy link
Author

trac user marcus wrote on 39308924-07-08

(In [svn:3226]) Closes #957: Groups topics now handle deleted users, I recommend that people look at what I've done and handle deleted users in a similar way in their plugins.

@elgg-gitbot
Copy link
Author

trac user marcus wrote on 39308931-11-26

Actually, thinking about it... perhaps we do want to delete owned metadata/annotations afterall. Banned should leave data available, but delete should be a purge... thoughts?

@elgg-gitbot
Copy link
Author

trac user kevinjardine wrote on 39309007-10-07

I would strongly support clearing all owned data (including annotations) when deleting an entity. The alternative is an inconsistent database.

@elgg-gitbot
Copy link
Author

trac user marcus wrote on 39309112-08-27

(In [svn:3227]) Closes #957: Annotations and metadata owned by a deleted user are now also deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant