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

Fixed Deleting a picture in the gallery doesn't delete the attachment?

Discussion in 'Media Gallery Resolved Bugs' started by Walter, Nov 13, 2014.

  1. Walter

    Walter Well-Known Member

    I uploaded a picture to the gallery in the demo (142 if you want to take a look on it) and later decided to delete the picture (hard delete).

    The picture is no longer visible in the gallery but it still shows up in the ACP attachment browser. When I click on the link to view the content I get an error that I have no permissions: "You do not have permission to view this page or perform this action."
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It should be deleted once the clean up cron runs.
     
  3. Walter

    Walter Well-Known Member

    Ran the cron manually, the attachment is still there.
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    Yeah, there's sort of a bug here but not quite what you're thinking.

    The attachment does stay visible in the Attachment Browser, whereas it shouldn't do after it has been hard deleted.

    The attachment WILL get deleted, though, as a normal attachment would. It actually gets marked as unassociated. That clean up cron will only delete the file from the file system and attachment from the database after the attach_date was over 24 hours ago.

    So it will clean up tomorrow.

    But, indeed, there is a bug with regards to the item staying in the browser which I will look at. It should disappear from there immediately.
     
    Brogan, resonansER and Walter like this.
  5. Chris D

    Chris D XenForo Developer Staff Member

    @Walter, did it disappear from the Attachment Browser eventually as I suspected it would?
     
  6. Walter

    Walter Well-Known Member

    Yes, vanished.
     
    Chris D likes this.
  7. Chris D

    Chris D XenForo Developer Staff Member

    Thanks Walter.

    Yeah I just checked into this, and everything was being deleted as and when it should have been; however there was a small inconsistency with how attachments were marked for deletion as a result of the content being removed. This has been sorted now and fixed in XFMG 1.0.1.

    It only affected the ability to see the attachment in the Attachment Browser until the data was cleaned up by Cron up to 24 hours later.
     
    Walter likes this.

Share This Page