Deleting user deletes recycled topics

Started by Elmacik, September 04, 2015, 03:04:43 AM

Previous topic - Next topic

Elmacik

Version 2.0.10

Brand new installation, no mods, UTF-8, Turkish lang pack.

The steps;

1- You have a recycle board.
2- You delete a member, selecting "delete all topics and messages" without checking the box "delete this member", which first confirms with JS if you really want to delete that account.
3- Member is not deleted, but his/her topics and messages are moved to recycle board.
4- You go to delete the account again, this time checking the "delete this member" box now, and selecting "delete all topics and messages".
5- Recycled topics and messages are gone forever, which is not expected whereas they were already deleted. (Moved to recycle board.)

If this is intended, then it should delete all them at the first place rather than moving them into recycle board. And another problem here yet, topics and messages are deleted even if you don't confirm "are you really sure to delete" question.
Home of Elmacik

margarett

I suggest it's not a bug, it's more like design
ProfileActions.php
// Only delete this poor members account if they are actually being booted out of camp.
if (isset($_POST['deleteAccount']))
deleteMembers($memID);


This only exists *after* the messages are already removed. So when you click the "Delete" button, you delete the messages as long as "Remove messages" is different from "None", no matter if "Delete this account" is checked or not.
The first time you delete the messages they go to recycle bin, next time they are gone forever (like any other post or topic ;) )
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Elmacik

I guess that's right for deleting the topics and messages without deleting the member. But for the main issue; if deleting the topics from recycle board is by design, then it should delete at the first place, rather than moving into recycle board. Otherwise, it's conflicting with the logic of recycling system. Because in recycling system, messages are moved to a recycle board until you actaully go into that board and delete the message forever. Plus, if it's by design, then for the second time you take the same step, it should leave the messages intact in the recycle board, because they are already deleted. In the current design, some users' deletion will move their topics to recycle board, some other users' deletion will purge their topics forever.

To sum up; you repeat the same action for twice; but you get two different results, which is incorrect. If it's gonna stay this way, admin must be warned about it; since he won't know which message is going to be recycled and which will be purged. While I still think it's incorrect; because in programming, repeating the same step should always produce the same result.
Home of Elmacik

Illori

i have not tested with 2.1 but i know once a topic/message hits the recycle board it requires clicking a specific link to delete it after that, maybe that should also apply to this?

Kindred

yes and no....


you do not have to go INTO the recycle board to permanently delete message which are already there.
In the user's profile, under posts by that user...   admins have the option to delete messages from that location. Selecting delete/remove message (if it is in the recycle board) WILL delete it permanently.

ANY delete action taken from the normal forum (e.g. messages not in the recycle board) will result in messages sent to the recycle board.
ANY delete action taken on message in the recycle board will result in a permanent delete... 

So, the activity seems to be correct, FAD... (and actually is logical)

(and no, Illori - it does not require a special link to delete a message in the recycle board, AFAIK -- nor should it.   This is exactly FAD.)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Oldiesmann

The layout of that page has been changed in 2.1 to make it slightly less confusing. Now you have three checkboxes - delete the member's poll votes, delete the member's posts (with the option to choose between "replies to topics" or "topics and posts") and delete the member's account. I haven't checked but I would assume it still deletes all of the member's posts regardless of where they're at. Maybe it should be changed to follow recycling (or with an added option for that) instead?
Michael Eshom
Christian Metal Fans

Illori

if you do that then you need to make sure the option only shows if there is a recycle board, also you would need to make sure that the old function deletes and bypasses the recycle board. it may cause some confusion though for those that have used the function before and the topics/posts ended up in the recycle board.

Kindred

Oldies -- unless you have changed the actual programming of the delete routine -- when you delete a user and opt to delete the messages and /or threads - I am pretty sure the deleted objects will go into the recycling board (if one is set up) AND that message currently IN the recycling board will get permanently deleted - exactly as it occurs right now.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Oldiesmann

If that's what it's doing, then that's horribly confusing. Either they should all stay in there or they should all get permanently deleted - not "if it's already in the recycling bin delete it otherwise move it there"...
Michael Eshom
Christian Metal Fans

margarett

IMO the "problem" is it allowing to delete the members' posts without actually deleting the users (eg: you uncheck the box again). I think it shouldn't allow that and the problem will fix itself (because looking at the code, it isn't that easy to create conditionals whether the posts are recycled or not just coming from the delete user interface).
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

oldies....   you think that is confusing?  it seems logical to me. :)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

Quote from: Kindred on September 05, 2015, 03:55:20 PM
Oldies -- unless you have changed the actual programming of the delete routine -- when you delete a user and opt to delete the messages and /or threads - I am pretty sure the deleted objects will go into the recycling board (if one is set up) AND that message currently IN the recycling board will get permanently deleted - exactly as it occurs right now.
It is logical, but maybe not desirable... The "issue" is that everything uses removeTopics/removeMessage and the behavior is: move to recycle bin, delete permanently if there already.
And what's pointed is that user posts already in the recycle bin shouldn't be removed when deleting the user, which will currently happen ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Oldiesmann

Quote from: margarett on September 08, 2015, 01:01:13 PM
IMO the "problem" is it allowing to delete the members' posts without actually deleting the users (eg: you uncheck the box again). I think it shouldn't allow that and the problem will fix itself (because looking at the code, it isn't that easy to create conditionals whether the posts are recycled or not just coming from the delete user interface).

I don't see this as a problem at all. Some people may want to just delete all the users' posts without deleting their accounts. Currently there is no option to determine whether or not to delete stuff that's already recycled, but it wouldn't be hard to add that at all.

Quote from: Kindred on September 08, 2015, 01:35:25 PM
oldies....   you think that is confusing?  it seems logical to me. :)

I understand why the function works that way (99% of the time all the topics we delete will be in the same board), but it doesn't make sense in this situation.
Michael Eshom
Christian Metal Fans

Oldiesmann

Michael Eshom
Christian Metal Fans

Elmacik

Quote from: Oldiesmann on September 08, 2015, 12:55:33 PM
If that's what it's doing, then that's horribly confusing. Either they should all stay in there or they should all get permanently deleted - not "if it's already in the recycling bin delete it otherwise move it there"...

Agreed. It's horribly confusing because admin will never be sure which messages will be gone forever. It's not logical for two reasons;

1- Repeating the same steps should always produce the same results, while it doesn't now.
2- Conflicting with "recycle board" system, because if a message is recycled, it should stay there until the admin wants to purge.
Home of Elmacik

Oldiesmann

I'll go ahead and merge in my changes then. It will add an extra checkbox to the delete account page allowing you to choose whether to permanently delete topics/posts. If checked, everything gets deleted regardless of where it is. If unchecked, anything not in the recycling board gets recycled while anything already in that board gets left alone. That should be more in line with what people want.
Michael Eshom
Christian Metal Fans

Advertisement: