Fixed Zombie records remain when a thread is deleted


Well-known member
Affected version
When a thread is deleted, XF\Entity\Thread#_postDelete() fails to clean some tables, such as xf_thread_watch. At the end of the method, it cleans thread reply bans:
$db->delete('xf_thread_reply_ban', 'thread_id = ?', $this->thread_id);
I would expect it to handle xf_thread_watch and xf_thread_user_post there as well, but it seems to skip those. xf_thread_watch appears to retain entries indefinitely.
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.7).

Change log:
When permanently deleting threads, ensure associated records are deleted too
There may be a delay before changes are rolled out to the XenForo Community.
Top Bottom