View Single Post
  #13  
Old 22 Mar 2016, 23:13
Mark.B Mark.B is offline
 
Join Date: Feb 2004
4.2.3 doesn't delete attachments at all, and whether you rebuild them makes zero difference.

What happened in those cases is this:

vB4 was always supposed to have a cron job that ran to delete any attachments marked as 'unused'. Unused means the post(s) they were in were deleted, so in effect the attachment is 'orphaned'...it exists but isn't used anywhere. They are marked as unused by the refcount value.

The script that was meant to run regularly to delete these unused attachments was broken and had been for years....in 4.2.3 it got fixed, so any unused attachments then got deleted, which is entirely correct.

The sites that experienced problems with ALL attachments being deleted, had an issue whereby the refcount values for their attachments had got corrupted some time way back in the past, meaning ALL their attachments were mrked as unused. This previously didn't have any effect, since the attachment deletion cron didn't work. But as of 4.2.3, it did.....so such sites lost all their attachments. This issue could not have been reasonably foreseen, and it's a good example of why you NEVER UPGRADE WITHOUT A FULL BACKUP. We don't say it for fun.

In 4.2.4, Paul has added a refcount check to the upgrade script, so this issue won't arise in 4.2.4 onwards, as the refcounts will be fixed if they're wrong.

The overwhelming majority of sites were NOT affected by this issue, it was just a small handful.
__________________
MARK.B (Member of the vB Support Team)
Reply With Quote