1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Soft-delete attachments so they can be restored

Discussion in 'XenForo Suggestions' started by CyclingTribe, Sep 28, 2016.

  1. CyclingTribe

    CyclingTribe Well-Known Member

    We've had a member rage-quit and delete all their posts and attachements. With post history we have been able to restore all the posts, but all the attachments are gone, since it appears they are hard-deleted when a member edits their post and removes them. This is not the first time, and it won't be the last.

    I would like to suggest a change in behaviour so that attachments are soft-deleted when a member removes them, allowing the attachments to be restored either manually or along with post content if you revert to a previous history version.

    Shaun (y)
    Liam W, Brent W, Sim and 15 others like this.
  2. CyclingTribe

    CyclingTribe Well-Known Member

    We've also had moderators doing this (unintentionally) - so I'd like to bump this suggestion as we now have XF2 in development and I would like to see an option to have attachments SOFT DELETE instead of hard delete and disappearing from the server.

    Shaun :D
  3. Alfa1

    Alfa1 Well-Known Member

    If a member does not have permissions to hard delete content, then content should not be hard deleted by the member.
    From this perspective this issue seems to be a bug to me. At least something that needs to be looked at because it is not logical / expected behavior and causes data loss.
  4. Roo82

    Roo82 Member

    I know with my Moderators I don't let them hard delete anything and as far as members having the ability to delete their post I don't allow that and they only have 10 minutes to edit their own posts.
  5. Martok

    Martok Well-Known Member

    I don't allow anyone on my forums to hard delete anything, plus members can't soft delete posts (they can only do profile posts).

    However, your moderators can soft delete posts (presumably) and maybe edit for longer than others? If so, then if they do any of this with posts that have attachments, the attachments will be lost. If you don't like the idea of this happening, then please like the first post to show your support. :)
    Alfa1 likes this.
  6. Alfa1

    Alfa1 Well-Known Member

    A logical solution seems to me to have a soft-delete function for attachments and a setting in admincp to automatically hard delete soft deleted attachments after X days.
  7. AndyB

    AndyB Well-Known Member

    I think the best solution is to not allow editing posts after a short time, for example 24 hours. This solves the problem of a member deleting their attachments.
  8. Alfa1

    Alfa1 Well-Known Member

    Indeed, but that doesn't solve the problem of staff soft deleting content causing hard deletion of attachments.
  9. Mike

    Mike XenForo Developer Staff Member

    Soft deleting content doesn't hard delete attachments. The attachments are kept in that case. But you can't soft delete the attachments themselves. (I'm not sure if that was just a bad wording; just clarifying to others that may see this.)
    CyclingTribe likes this.
  10. CyclingTribe

    CyclingTribe Well-Known Member

    Thanks Mike. It would be great if we could have soft delete of attachments in XF2 (at some point) ... just to plug the no-hard-delete hole in our current board settings ... :whistle: ;)
  11. jmurrayhead

    jmurrayhead Well-Known Member

    So, from your first post, you claimed a member rage-quit and deleted all their content and attachments couldn't be restored. But Mike just said:
    So does that mean your rage-quitter could hard-delete posts?
  12. Brogan

    Brogan XenForo Moderator Staff Member

    I suspect they edited the posts and removed the attachments (and content) from them.
    CyclingTribe likes this.
  13. jmurrayhead

    jmurrayhead Well-Known Member

    ahhh, I see. So when attachments are deleted from a post, they are deleted for good, not disassociated from the post. And when a post itself is soft-deleted, nothing happens to the attachment.
    CyclingTribe likes this.
  14. Brogan

    Brogan XenForo Moderator Staff Member

    Exactly that.
    jmurrayhead likes this.
  15. CyclingTribe

    CyclingTribe Well-Known Member

    Yup, that's what happened - but I've also had it happen when a moderator edited a post and accidentally deleted the attachments (and we discovered afterwards that they could not be recovered - much to the annoyance of the member who had uploaded them years ago and no longer had the originals available).

    Just looking to avoid those situations in the future and to bring attachment deletion inline with other content deletion (i.e. it can be recovered from). :)
    jmurrayhead likes this.

Share This Page